var Quote = function( quote, citation ){
  this.quote = quote;
  this.citation = citation;
}

var quotations = [
                          
  new Quote( "Design is so critical it should be on the agenda of every meeting in every single department.",  "Tom Peters, 2003"),
  new Quote( "I've been amazed at how often those outside the discipline of design assume that what designers do is decoration. Good design is problem solving.",  "Jeffery Veen, 2000"),
  new Quote( "Recognizing the need is the primary condition for design.",  "Charles Eames"),
  new Quote( "Design is a plan for arranging elements in such a way as best to accomplish a particular purpose.",  "Charles Eames"),
  new Quote( "The real questions are: Does it solve a problem? Is it serviceable? How is it going to look in ten years?",  "Charles Eames"),
  new Quote( "Design is not just what it looks like and feels like. Design is how it works.",  "Steve Jobs, 2003"),
  new Quote( "Design is directed toward human beings. To design is to solve human problems by identifying them and executing the best solution.",  "Ivan Chermayeff"),
  new Quote( "Form follows function-that has been misunderstood. Form and function should be one, joined in a spiritual union.",  "Frank Lloyd Wright"),
  new Quote( "Questions about whether design is necessary or affordable are quite beside the point: design is inevitable. The alternative to good design is bad design, not no design at all.",  "Douglas Martin, 1989"),
  new Quote( "An enterprise's most vital assets lie in its design and other creative capabilities.",  "Kun-Hee Lee, 2006"),
  new Quote( "There will never be great architects or great architecture without great patrons. ",  "Edwin Lutyens"),
  new Quote( "Give me the luxuries of life and I will willingly do without the necessities. ",  "Frank Lloyd Wright ")/*,
  new Quote( "I'm all in favor of keeping dangerous weapons out of the hands of fools. Let's start with typewriters. ",  "Frank Lloyd Wright "),
  new Quote( "A child of five would understand this. Send someone to fetch a child of five. ",  "Groucho Marx"),
  new Quote( "A woman is an occasional pleasure but a cigar is always a smoke. ",  "Groucho Marx"),
  new Quote( "Anyone who says he can see through women is missing a lot.",  "Groucho Marx"),
  new Quote( "Either he's dead or my watch has stopped.",  "Groucho Marx"),
  new Quote( "From the moment I picked your book up until I laid it down, I convulsed with laughter. Someday I intend on reading it.",  "Groucho Marx"),
  new Quote( "I intend to live forever, or die trying.",  "Groucho Marx"),
  new Quote( "I never forget a face, but in your case I'll be glad to make an exception.",  "Groucho Marx"),
  new Quote( "I was married by a judge. I should have asked for a jury.",  "Groucho Marx"),
  new Quote( "No man goes before his time - unless the boss leaves early.",  "Groucho Marx"),
  new Quote( "She got her looks from her father. He's a plastic surgeon. ",  "Groucho Marx") */
  
]


function addQuotation(){
  var index = (window.quotationIndex) ? window.quotationIndex : Math.floor( Math.random() * window.quotations.length ) ;
  var q = document.getElementById('quote_text');
  var c = document.getElementById('citation_text');
  var qTextNode = document.createTextNode( quotations[index].quote );
  var cTextNode = document.createTextNode( quotations[index].citation );
  if(q.firstChild) q.removeChild(q.firstChild);
  if(c.firstChild) c.removeChild(c.firstChild);
  q.appendChild( qTextNode );
  c.appendChild( cTextNode );
}

addLoadEvent(addQuotation);
