quotes = [

"\"We found ourselves transported in time and place with the music and art. The guides you provided were excellent crib sheets for a layman like myself.\" -- Victoria Chilcott, award winning children's author",

"\"I'm fairly hard to please when it comes to music, and I can honestly say I could have spent many more hours listening to their virtuosic, gorgeous playing.\"  -- Jenny Ball, Young Entrepreneurs Association",

"\"The venue was fabulous, and so suitable for the wonderful music that was so uplifting and interesting, with the cards to inform us ignoramuses of the composer and local history of the time, made interesting reading and all added to the experience.\" -- Ecademy.com",

"\"Loads of our clients and partners thanked us profusely for the evening, and raved about the music, even people who don't normally appreciate classical music.\"  -- Tom Ball, Director, Cognac.co.uk",

"\"I haven't had such an enjoyable cultural evening like that in years. I hadn't realized how much I needed that 'fix'. ... Penelope was fantastic and made the really difficult parts look like she was really enjoying herself, and she plays with such feeling and passion.\" -- A.W., Ecademy.com",

"\"It was thoroughly enjoyable in every respect. I will spread the word about Realm of Music!\" -- Anthony Simpson, Managing Director, Merrill Lynch",

"\"The combination of food, drink, socializing, and music is a winner. Liked the relaxed, friendly atmosphere. Many people also liked seeing the instruments up close, and mingling with the musicians afterward.\" -- Eric Beinhocker, Partner, McKinsey & Company",

"\"I really wanted to thank you for last night.  It was truly amazing; thank you so much for letting us bring our contacts along.\" - Jenny Ball, Young Entrepreneurs Association",

"\"Loads of our clients and partners thanked us profusely for the evening and raved about the music, even people who normally don't appreciate classical music.  The favourite was definitely the improvisation at the end.\"- Jenny Ball, Young Entrepreneurs Association",

"\"I just wanted to say thanks for yet another fantastic evening of music.  The setting was divine, the playing fantastic and the commentary by you all about the composers, the history and your instruments made a perfect evening.\" - Susanne Hounslow, Partner, Data2Impact",

"\"Thanks very much for an enjoyable evening. Much appreciated.\" - Justin Speake, CEO Bloor Rresearch",

"\"Thank you for a great evening.  The performance was truly wonderful.\" - Eugene Lawlor, Positive Solutions Financial Services",

"\"Just a quick note to say, yet again, thank you for a fantastic evening last night - every one I spoke to thoroughly enjoyed it and I have had several emails from our clients complimenting your performance and the layout of the event.\" Helen McKintyre, events organiser, Christie's",

"\"Thanks so much for giving us such a brilliant evening. Everyone loved it!\" - Joy Park, Events Organiser, McKinsey & Company",

"\"Thank you for a most enjoyable evening. It was a nicely conceived event. Realm of Music was superb and combination with the Christie Old Masters sale worked so well.\" -- Tim Donlevy",

"\"...the feedback that I have received has been excellent, everyone enjoyed the evening immensely, and it is certainly hoped that we will repeat it.\" -- Alistair Telfer, Secretary, Carlton Club" ];



// When loading page or resizing browser, circulate between different quotes
function loadpage()
{
    // The quote field only exists on the home page, and identifies
    // whether we're on the home page; exit otherwise
    var q = document.getElementById("quote");
    if ( ! q )
        return;

    // Pick a random banner image (front page only)
    var numBanners = 6;
    var i = Math.floor(Math.random() * numBanners);
    var b = document.getElementById("banner");
    b.style.backgroundImage = "url(static/banner" + i + ".jpg)"; 

    // Display random quote (home page only)
    var secs = 5; // Set this to the number of seconds
    var i = Math.floor(Math.random() * quotes.length);
    q.innerHTML = quotes[i];
    setTimeout(changeQuote, secs * 1000);
}



// Mouse over a menu item: change font and image, maybe style
function menuOver(evt)
{
   evt.target.style.className = "selected";
}

// Mouse out menu item: restore font and image
function menuOut(evt)
{
   evt.target.style.className = "normal";
}

// IS THIS USED?
function showText(which)
{
    var t1 = document.getElementById("text1"),
        t2 = document.getElementById("text2");
    if ( which == 1 ) {
        t2.style.visibility = "hidden";
        t1.style.visibility = "visible";
    }
    else {
        t1.style.visibility = "hidden";
        t2.style.visibility = "visible";
    }
}


// Make description vs. programme visible upon mouseover
// DEPRECATED, TO BE REMOVED
function showProgramme(showprog)
{
    var desc = document.getElementById("description"),
        prog = document.getElementById("programme");

    var show, hide;

    if ( showprog ) {
        show = prog;
        hide = desc;
    }
    else {
        show = desc;
        hide = prog;
    }

    show.style.visibility = "visible";
    show.style.display = "block";

    hide.style.visibility = "hidden";
    hide.style.display = "none";
}

// For programme pages, show description, programme, or listening cards.
function show(id)   // 0=descr, 1=programme, 2=cards
{
    var desc =  document.getElementById("description"),
        prog =  document.getElementById("programme"),
        cards = document.getElementById("cards"),
        video = document.getElementById("video");

    // Chose which elements to hide or show
    var show = [], hide = [];

    if ( id == 0 ) {        // description
        show.push(desc);
        hide.push(prog);
        hide.push(cards);
        //show.push(video);
    }
    else if ( id == 1 ) {   // programme
        show.push(prog);
        hide.push(desc);
        hide.push(cards);
        //show.push(video);
    }
    else if ( id == 2 ) {   // listening cards (hides video)
        show.push(cards);
        hide.push(prog);
        hide.push(desc);
        //hide.push(video);
    }

    /* Hide chosen element */
    for ( var i = 0; i < hide.length; ++i ) {
        var e = hide[i];
        e.style.visibility = "hidden";
        e.style.display = "none";
    }

    /* Make the chosen elements visible */
    for ( var i = 0; i < show.length; ++i ) {
        var e = show[i];
        e.style.visibility = "visible";
        e.style.display = "block";
    }
}


