

function StringArray (n) {
  this.length = n;
  for (var i =1; i <= n; i++) {
    this[i] = ' '

  }
}

quote = new StringArray(5)
quote[0] = "Children are likely to live up to what you believe in them."
quote[1] = "Imagination is more important than knowledge."
quote[2] = "Learn of the skilful; He that teaches himself, hath a fool for his master."
quote[3] = "He who opens a school door, closes a prison."
quote[4] = "Not everything that can be counted counts, and not everything that counts can be counted. "

author = new StringArray(5)
author[0] = "Lady Bird Johnson"
author[1] = "Albert Einstein"
author[2] = "Benjamin Franklin"
author[3] = "Victor Hugo"
author[4] = "Albert Einstein"


function writeQuote()
{
var now = new Date()
var sec = now.getSeconds()
var core = sec % quote.length

var thequote = quote[core]
var theauthor = author[core]
var theq = '&quot;'
var theend = ''


document.write( '<i>' + theq + thequote + theq + " " + theauthor + '</i>'  )
}


