var quotes = new Array
(
"<div class=quoteStyle>\"Woah! This's awesome. Buying as soon as I can.\"</div><div class=quoteAuthor>-SR095</div>",
"<div class=quoteStyle>\"I hope I can find a way to buy it... If I do I'll get the<br />soundtrack too since I'm a big fan of Dan Wentz.\"</div><div class=quoteAuthor>-AlterFox</div>",
"<div class=quoteStyle>\"Nice trailer. Looks like a killer sequel to DESCENT and FORSAKEN.<br />Probably will make space game of the year for sure.\"</div><div class=quoteAuthor>-Hellbishop</div>",
"<div class=quoteStyleSmaller>\"...it's good to see the devs taking on an active role in moderating and<br />participating within the community.Even in the indie realm, this is<br />quite a rare thing\"</div><div class=quoteAuthor>-ultradm</div>",
"<div class=quoteStyle>\"...downloading the game demo now. IT looks SWEET.\"</div><div class=quoteAuthor>-MorOre</div>",
"<div class=quoteStyle>\"Reminds me of Descent... I like it! :)\"</div><div class=quoteAuthor>-DarthYoda27</div>",
"<div class=quoteStyle>\"This sound MUCH better than EVE.\"</div><div class=quoteAuthor>-AklyonX</div>",
"<div class=quoteStyle>\"Looking forward to this! ^^\"</div><div class=quoteAuthor>-OverlordIX</div>",
"<div class=quoteStyle>\"I've been waiting, I love the idea!\"</div><div class=quoteAuthor>-Untoten123</div>",
"<div class=quoteStyle>\"Wow. I've been looking for a game quite like this.<br />It looks promising. Nice work.\"</div><div class=quoteAuthor>-RivendareRogue</div>",
"<div class=quoteStyle>\"Brings back fond memories of Descent there at the start...<br />the engine seemed to model your Asteroids very nicely too...\"</div><div class=quoteAuthor>-ConductiveDan</div>",
"<div class=quoteStyle>\"I think you just got yourself another MinerWars player. :3<br />What a great concept.\"</div><div class=quoteAuthor>-varsaigen</div>",
"<div class=quoteStyle>\"I like the concept of this. It seems much more original<br />than games of late.\"</div><div class=quoteAuthor>-Sodiumreactor</div>",
"<div class=quoteStyle>\"Sexy game you are working on. I really like it.<br />Can't wait for the release :)\"</div><div class=quoteAuthor>-uzzyytt</div>",
"<div class=quoteStyle>\"minerwars looks totally sweet man\"</div><div class=quoteAuthor>-Hyperion117</div>",
"<div class=quoteStyle>\"It looks, sounds and <i>feels</i> right already...\"</div><div class=quoteAuthor>-Dominic Tarason</div>",
"<div class=quoteStyleSmaller>\"This is awesome! For only 10 Euro now I can get the full game by the<br />time it's released, heh heh! A steal of a deal that anyone would be a fool<br />to pass up! *grinz*\"</div><div class=quoteAuthor>-Haay1971</div>"
)

//	Start at a random offset
var quoteNumber = Math.floor(Math.random() * quotes.length);

function getRandomQuote() {
    var quote = quotes[quoteNumber];
    quoteNumber = (quoteNumber + 1) % quotes.length;

    return quote;
}

function setQuote(id, fadeMs, holdMs) {
    //	Set opacity to 0 here
    var area = document.getElementById(id);
    var newQuote = getRandomQuote();
    area.innerHTML = newQuote;

    //	Extend hold time a bit for longer quotes
    var holdMs = holdMs + newQuote.length * 10;

    var timeBeforeSwitch = fadeMs + holdMs + fadeMs;
    setTimeout('setQuote(\'' + id + '\', ' + fadeMs + ', ' + holdMs + ')', timeBeforeSwitch);

    var timeToTriggerFadeOut = fadeMs + holdMs;
    setTimeout('$(\'quoteArea\').fade(0);', timeToTriggerFadeOut);
}

window.onload = function(evt) {
    setQuote('quoteArea', 1000, 10000);
}
