var quotes = new Array();
var authors = new Array();

quotes[0] = "As one of the most brilliant Bible scholars of our generation, Wayne Grudem takes the core beliefs of our faith and makes them practical for followers of Jesus Christ&mdash;new and mature alike. This is an invaluable resource &mdash; get it for your church and use it!";
authors[0] = "Dr.&nbsp;James MacDonald";

quotes[1] = "Formal theological training was never a privilege I enjoyed. But had I attended seminary, I would have wanted to learn theology in Wayne Grudem&rsquo;s classroom. This DVD series now makes this possible for me&mdash;and for you.";
authors[1] = "C J Mahaney";

quotes[2] = "This is a great resource from one of the world&rsquo;s best theology teachers.";
authors[2] = "Mark Driscoll";

quotes[3] = "These truly are twenty basic beliefs that every Christian should know. Wayne Grudem is a master teacher with the ability to explain profound truths in simple language. He is a man of deep conviction and theological passion &mdash; and those who watch these DVDs will be both educated and encouraged in the faith.";
authors[3] = "Dr.&nbsp;Al Mohler";

/*
quotes[0] = "Wayne Grudem is one of those very rare pastor-theologians who speaks and writes with equal clarity and faithfulness. That’s why listening is often even more satisfying than reading. I am glad his voice (and heart) is now available in this way.";
authors[0] = "John Piper";
*/

/*
quotes[2] = "";
authors[2] = "";

quotes[2] = "";
authors[2] = "";
*/

var quote = Math.floor(Math.random()*(quotes.length-1));

var pause = 8000;

function rotatequotes() {
  quote++;
  if (quote >= quotes.length) {
    quote = 0;
  }
  document.getElementById("quote").innerHTML = quotes[quote];
  document.getElementById("author").innerHTML = "&mdash; " + authors[quote];
//  setTimeout("rotatequotes()", 4000);
}

function levtocol(l) {
  c = l.toString(16);
  if (c.length == 1) {
    c = "0" + c;
  }
  return "#" + c + c + c;
}

var glevel = 255;

function fadetextin() {
  glevel += 10;
  if (glevel < 255) {
    gstr = levtocol(glevel);
    document.getElementById("banner").style.color = gstr;
    setTimeout("fadetextin()", 15);
    return;
  }
  setTimeout("fadetextout()", pause);
}

function fadetextout() {
  glevel -= 10;
  if (glevel > 0) {
    gstr = levtocol(glevel);
    document.getElementById("banner").style.color = gstr;
    setTimeout("fadetextout()", 15);
    return;
  }
  glevel = 0;
  rotatequotes();
  fadetextin();
}

setTimeout("fadetextout()", pause);


