    // 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}/th_8P2081.jpg";
gift1_img[1] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/th_8P3317.jpg";
gift1_img[2] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/th_8P3320.jpg";
gift1_img[3] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/th_7P3325.jpg";

gift2_img[0] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/th_7P3321.jpg";
gift2_img[1] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/th_7P3313.jpg";
gift2_img[2] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/th_8P3313.jpg";
gift2_img[3] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/th_8P3318.jpg";

gift3_img[0] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/th_8P3670.jpg";
gift3_img[1] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/th_8P3810.jpg";
gift3_img[2] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/th_8P3910a.jpg";
gift3_img[3] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/th_8P3770.jpg";

gift4_img[0] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/th_7P103A.jpg";
gift4_img[1] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/th_7P101B.jpg";
gift4_img[2] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/th_8P2003.jpg";
gift4_img[3] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/th_8P2001.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] = "Little UNICEF Friends Display Box";
gift1_dsc[1] = "Soft Skittles";
gift1_dsc[2] = "UNICEF Mission Play Set by BRIO";
gift1_dsc[3] = "Brio Ant with Egg";

gift2_dsc[0] = "UNICEF Supplies Truck Model";
gift2_dsc[1] = "Bear and Baby Bear";
gift2_dsc[2] = "School Bear";
gift2_dsc[3] = "Doctor Play Set";

gift3_dsc[0] = "Miffy Children's Mug";
gift3_dsc[1] = "Miffy Plate and Bowl Set";
gift3_dsc[2] = "Children's Rights DVD";
gift3_dsc[3] = "Adidas UNICEF Football";

gift4_dsc[0] = "Photowall Calendar";
gift4_dsc[1] = "Photo Desk Diary";
gift4_dsc[2] = "Home Organisation + Correspondence Kit";
gift4_dsc[3] = "Reflections Writing Set";

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=3368643";
gift1_url[1] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=3368647";
gift1_url[2] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=3368649";
gift1_url[3] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=3368651";

gift2_url[0] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=3368653";
gift2_url[1] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=3368655";
gift2_url[2] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=3368657";
gift2_url[3] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=3368659";

gift3_url[0] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=3368661";
gift3_url[1] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=3369413";
gift3_url[2] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=3369415";
gift3_url[3] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=3369417";
 
gift4_url[0] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=3369419";
gift4_url[1] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=3369421";
gift4_url[2] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=3369423";
gift4_url[3] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=3369425";

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}/th_70171.jpg";
card1_img[1] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/th_70172.jpg";
card1_img[2] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/th_70173.jpg";
card1_img[3] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/th_70174.jpg";

card2_img[0] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/th_70156.jpg";
card2_img[1] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/th_70158.jpg";
card2_img[2] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/th_70159.jpg";
card2_img[3] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/th_70160.jpg";

card3_img[0] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/th_70201.jpg";
card3_img[1] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/th_70202.jpg";
card3_img[2] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/th_70203.jpg";
card3_img[3] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/th_70204.jpg";

card4_img[0] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/th_72221.jpg";
card4_img[1] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/th_7B007.jpg";
card4_img[2] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/th_7B032.jpg";
card4_img[3] = "/atf/cf/{D0C050F6-FEA8-403D-83F2-11FB7AE5FDB3}/th_7B062.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] = "Sparkle Series";
card1_dsc[1] = "Sparkle Series";
card1_dsc[2] = "Sparkle Series";
card1_dsc[3] = "Sparkle Series";

card2_dsc[0] = "Christmas Spice Series";
card2_dsc[1] = "Christmas Spice Series";
card2_dsc[2] = "Christmas Spice Series";
card2_dsc[3] = "Christmas Spice Series";

card3_dsc[0] = "Winter Series";
card3_dsc[1] = "Winter Series";
card3_dsc[2] = "Winter Series";
card3_dsc[3] = "Winter Series";

card4_dsc[0] = "Luxury Box Series";
card4_dsc[1] = "Luxury Box Series";
card4_dsc[2] = "Luxury Box Series";
card4_dsc[3] = "Luxury Box Series";

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=3368213";
card1_url[1] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=3368215";
card1_url[2] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=3368217";
card1_url[3] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=3368219";

card2_url[0] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=3368221";
card2_url[1] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=3368223";
card2_url[2] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=3368225";
card2_url[3] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=3368227";

card3_url[0] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=3368229";
card3_url[1] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=3368231";
card3_url[2] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=3368233";
card3_url[3] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=3368235";

card4_url[0] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=3368237";
card4_url[1] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=3368245";
card4_url[2] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=3368247";
card4_url[3] = "http://www.supportunicef.org/site/lookup.asp?c=9fLEJSOALpE&b=3368249";

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);