var delayBetweenQuotes = 5400;

function Quote(quoteItself,author) 
{
  this.quoteItself = quoteItself;
  this.author = author;
}

function addQuote(q,a) {
	var q = new Quote(q,a);
	quotesList[quotesList.length] = q;

}
function makerand(num) {
  var now = new Date();
    var seed = now.getSeconds();
    	return Math.round(Math.random(now)*(num)); 
}
function replaceFirstChild(newNode, el) {
  for (var i=0;i<el.childNodes.length;i++) {
	el.removeChild(el.childNodes[i]);
  }
  if (el.hasChildNodes()) {
    el.replaceChild(newNode, el.childNodes[0]);
  } else {
   el.appendChild(newNode);
  }
}

var quotesList = new Array();
var currentQuote=-1;

addQuote('Thank you for your superb work and professionalism.  It has been a pleasure to work with you all.','Yves Wencker, Ritz, London February 2003');

addQuote('Everyone who watched your performance was inspired and charmed.',"Kathi Scott, Friends of The Nelson Mandela Children's Fund, November 2002");

addQuote('I would highly recommend you to anyone looking for touch of class and superb entertainment for their function','Mark Andrews, Gay Police Association');

addQuote('Charming, composed and very professional performance.  Quintessentially classic!','Lucy McCredi, Diana, The Work Continus, November 2002');

addQuote('A highly professional performance.  You were the highlight of the day!','John & Theresa Perry, January 2004');

addQuote('Thank you very much for making our wedding reception so memorable.','Andrew & Katherine, May 2002');

addQuote('Without question, your presence was a highlight of the evening with many people commenting on your outstanding professionalism and impressive performance throughout the evening.','Mark Andrews, Gay Police Association');


currentQuote = makerand(quotesList.length-1)

function nextQuote() {
currentQuote++;
if (currentQuote==quotesList.length) {
	currentQuote=0;
}
var el = document.getElementById('quotesarea');

var textNode = document.createTextNode('"'+quotesList[currentQuote].quoteItself+'"');
replaceFirstChild(textNode, el);
//el.appendChild(textNode);
//el.replaceChild(newNode, el.childNodes[0]);

var textNode2 = document.createTextNode(quotesList[currentQuote].author);

var newln = document.createElement('br');
el.appendChild(newln);

var its = document.createElement('i');
el.appendChild(its);
its.appendChild(textNode2);

setTimeout("nextQuote()",delayBetweenQuotes);


}

setTimeout("nextQuote()",0);

