// JavaScript Document
var core = 0
var currentdate = 0

function StringArray (n) {
  this.length = n;
  for (var i =1; i <= n; i++) {
    this[i] = ' '

  }
}

quote = new StringArray(6)
quote[0] = "Adversity causes some men to break, and others to break records."
quote[1] = "The one who never never makes mistakes, is the one who never makes anything."
quote[2] = "Every artist was first an amateur."
quote[3] = "An anxious heart weighs a man down, but a kind word cheers him up."
quote[4] = "In every defeat is a lesson showing you how to win victory next time."
quote[5] = "The best form of teaching is through story."
quote[6] = "If you settle for nothing but your best, you will be amazed at what you can accomplish."
quote[7] = "Try and fail, but don't fail to try."
quote[8] = "Explore. Dream. Discover."


author = new StringArray(6)
author[0] = "William A. Ward"
author[1] = "Denis Waitley"
author[2] = "Ralph Waldo Emerson"
author[3] = "Proverbs 12:25"
author[4] = "Robert Collier"
author[5] = "Kenneth Blanchard"
author[6] = "Vince Lombardi"
author[7] = "Stephen Kaggwa"
author[8] = "Mark Twain"





var ran = 60/quote.length

currentdate = new Date()
core = currentdate.getSeconds()
adcore = Math.floor(core/ran)
core = adcore

var thequote = quote[core]
var theauthor = author[core]
var thebreak = ' - '
var theq = '"'
var theend = ''

document.write(theq + thequote + theq + thebreak + theauthor + theend)
