    // JavaScript to interpolate random images into a page.


var n1 = 4; // Number of alternative images
var n2 = 4;
var n3 = 4;
var n4 = 4;
var n5 = 4;
var n6 = 4;

var gift1_img = new Array(n1); // Array to hold filepaths of images
var gift2_img = new Array(n2);
var gift3_img = new Array(n3);
var gift4_img = new Array(n4);
var gift5_img = new Array(n5);
var gift6_img = new Array(n6);

var gift1_url = new Array(n1);        //Hold URLs for each image
var gift2_url = new Array(n2);
var gift3_url = new Array(n3);
var gift4_url = new Array(n4);
var gift5_url = new Array(n5);
var gift6_url = new Array(n6);


var gift1_dsc = new Array(n1);			//Hold Image Description
var gift2_dsc = new Array(n2);
var gift3_dsc = new Array(n3);
var gift4_dsc = new Array(n4);
var gift5_dsc = new Array(n5);
var gift6_dsc = new Array(n6);


gift1_img[0] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/TOYS.JPG";
gift1_img[1] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/TOYS.JPG";
gift1_img[2] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/TOYS.JPG";
gift1_img[3] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/TOYS.JPG";

gift2_img[0] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/HOMEDECOR.JPG";
gift2_img[1] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/HOMEDECOR.JPG";
gift2_img[2] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/HOMEDECOR.JPG";
gift2_img[3] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/HOMEDECOR.JPG";

gift3_img[0] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/FASHIONACCESSORIES.JPG";
gift3_img[1] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/FASHIONACCESSORIES.JPG";
gift3_img[2] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/FASHIONACCESSORIES.JPG";
gift3_img[3] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/FASHIONACCESSORIES.JPG";

gift4_img[0] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/STATIONERY.JPG";
gift4_img[1] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/STATIONERY.JPG";
gift4_img[2] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/STATIONERY.JPG";
gift4_img[3] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/STATIONERY.JPG";

gift5_img[0] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/th_8P3580.jpg";
gift5_img[1] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/th_8P3566.jpg";
gift5_img[2] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/th_8P3565.jpg";
gift5_img[3] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/th_8P3520.jpg";

gift6_img[0] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/th_8P3522.jpg";
gift6_img[1] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/th_8P3509.jpg";
gift6_img[2] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/th_7P3523.jpg";
gift6_img[3] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/th_8P3650.jpg";

gift1_dsc[0] = "Toys";
gift1_dsc[1] = "Toys";
gift1_dsc[2] = "Toys";
gift1_dsc[3] = "Toys";

gift2_dsc[0] = "Home Decor";
gift2_dsc[1] = "Home Decor";
gift2_dsc[2] = "Home Decor";
gift2_dsc[3] = "Home Decor";

gift3_dsc[0] = "Fashion Accessories";
gift3_dsc[1] = "Fashion Accessories";
gift3_dsc[2] = "Fashion Accessories";
gift3_dsc[3] = "Fashion Accessories";

gift4_dsc[0] = "Stationery";
gift4_dsc[1] = "Stationery";
gift4_dsc[2] = "Stationery";
gift4_dsc[3] = "Stationery";

gift5_dsc[0] = "Ocean Incense Gift Set";
gift5_dsc[1] = "Flowers and Hearts Mini Candles";
gift5_dsc[2] = "Fern Candle Set";
gift5_dsc[3] = "Leaf Incense Gift Set";

gift6_dsc[0] = "South African Wire Art Ornaments";
gift6_dsc[1] = "Dove Ornaments";
gift6_dsc[2] = "Hand Painted Glass Ball";
gift6_dsc[3] = "Indian Shimmer Mugs";


gift1_url[0] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=4444479";
gift1_url[1] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=4444479";
gift1_url[2] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=4444479";
gift1_url[3] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=4444479";

gift2_url[0] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=4444481";
gift2_url[1] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=4444481";
gift2_url[2] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=4444481";
gift2_url[3] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=4444481";

gift3_url[0] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=4444483";
gift3_url[1] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=4444483";
gift3_url[2] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=4444483";
gift3_url[3] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=4444483";
 
gift4_url[0] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=4444485";
gift4_url[1] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=4444485";
gift4_url[2] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=4444485";
gift4_url[3] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=4444485";

gift5_url[0] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=3369427";
gift5_url[1] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=3369809";
gift5_url[2] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=3369811";
gift5_url[3] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=3369813";

gift6_url[0] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=3369815";
gift6_url[1] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=3369817";
gift6_url[2] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=3369823";
gift6_url[3] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=3369825";

var c1 = 4;
var c2 = 4;
var c3 = 4;
var c4 = 4;
var c5 = 4;
var c6 = 4;


/* Gift Card Section */
var card1_img = new Array(c1);        // Array to hold filepaths of images
var card2_img = new Array(c2);
var card3_img = new Array(c3);
var card4_img = new Array(c4);
var card5_img = new Array(c5);
var card6_img = new Array(c6);

var card1_url = new Array(c1);        //Hold URLs for each image
var card2_url = new Array(c2);
var card3_url = new Array(c3);
var card4_url = new Array(c4);
var card5_url = new Array(c5);
var card6_url = new Array(c6);

var card1_dsc = new Array(c1);		  //Hold Image Description
var card2_dsc = new Array(c2);
var card3_dsc = new Array(c3);
var card4_dsc = new Array(c4);
var card5_dsc = new Array(c5);
var card6_dsc = new Array(c6);

var card1_dsc2 = new Array(c1);		  //Hold Image Description 2
var card2_dsc2 = new Array(c2);
var card3_dsc2 = new Array(c3);
var card4_dsc2 = new Array(c4);
var card5_dsc2 = new Array(c5);
var card6_dsc2 = new Array(c6);

card1_img[0] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/CHRISTMASCARDS.JPG";
card1_img[1] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/CHRISTMASCARDS.JPG";
card1_img[2] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/CHRISTMASCARDS.JPG";
card1_img[3] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/CHRISTMASCARDS.JPG";

card2_img[0] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/HANDCRAFTEDCARDS.JPG";
card2_img[1] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/HANDCRAFTEDCARDS.JPG";
card2_img[2] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/HANDCRAFTEDCARDS.JPG";
card2_img[3] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/HANDCRAFTEDCARDS.JPG";

card3_img[0] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/EVERYDAYCARDS.JPG";
card3_img[1] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/EVERYDAYCARDS.JPG";
card3_img[2] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/EVERYDAYCARDS.JPG";
card3_img[3] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/EVERYDAYCARDS.JPG";

card4_img[0] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/BIRTHDAYCARDS.JPG";
card4_img[1] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/BIRTHDAYCARDS.JPG";
card4_img[2] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/BIRTHDAYCARDS.JPG";
card4_img[3] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/BIRTHDAYCARDS.JPG";

card5_img[0] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/th_70021.jpg";
card5_img[1] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/th_70022.jpg";
card5_img[2] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/th_70023.jpg";
card5_img[3] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/th_70025.jpg";

card6_img[0] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/th_70146.jpg";
card6_img[1] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/th_70147.jpg";
card6_img[2] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/th_70148.jpg";
card6_img[3] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/th_70149.jpg";


card1_dsc[0] = "Christmas Cards";
card1_dsc[1] = "Christmas Cards";
card1_dsc[2] = "Christmas Cards";
card1_dsc[3] = "Christmas Cards";

card2_dsc[0] = "Handcrafted Cards";
card2_dsc[1] = "Handcrafted Cards";
card2_dsc[2] = "Handcrafted Cards";
card2_dsc[3] = "Handcrafted Cards";

card3_dsc[0] = "Everyday Cards";
card3_dsc[1] = "Everyday Cards";
card3_dsc[2] = "Everyday Cards";
card3_dsc[3] = "Everyday Cards";

card4_dsc[0] = "Birthday Cards";
card4_dsc[1] = "Birthday Cards";
card4_dsc[2] = "Birthday Cards";
card4_dsc[3] = "Birthday Cards";

card5_dsc[0] = "Christmas Time in the City";
card5_dsc[1] = "Christmas Time in the City";
card5_dsc[2] = "Christmas Time in the City";
card5_dsc[3] = "Christmas Time in the City";

card6_dsc[0] = "Colourful Christmas Series";
card6_dsc[1] = "Colourful Christmas Series";
card6_dsc[2] = "Colourful Christmas Series";
card6_dsc[3] = "Colourful Christmas Series";

card1_url[0] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=4444487";
card1_url[1] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=4444487";
card1_url[2] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=4444487";
card1_url[3] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=4444487";

card2_url[0] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=4444489";
card2_url[1] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=4444489";
card2_url[2] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=4444489";
card2_url[3] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=4444489";

card3_url[0] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=4444491";
card3_url[1] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=4444491";
card3_url[2] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=4444491";
card3_url[3] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=4444491";

card4_url[0] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=4444493";
card4_url[1] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=4444493";
card4_url[2] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=4444493";
card4_url[3] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=4444493";

card5_url[0] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=3368251";
card5_url[1] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=3368253";
card5_url[2] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=3368255";
card5_url[3] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=3368257";

card6_url[0] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=3368259";
card6_url[1] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=3368261";
card6_url[2] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=3368639";
card6_url[3] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=3368641";



    // 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.

    var card1_choice = pickRandom(c1);
    var card2_choice = pickRandom(c2);
    var card3_choice = pickRandom(c3);
    var card4_choice = pickRandom(c4);
    var card5_choice = pickRandom(c5);
    var card6_choice = pickRandom(c6);
    

    var gift1_choice = pickRandom(n1);
    var gift2_choice = pickRandom(n2);
    var gift3_choice = pickRandom(n3);
    var gift4_choice = pickRandom(n4);
    var gift5_choice = pickRandom(n5);
    var gift6_choice = pickRandom(n6);