/**********************************************************************/
/*WORDS.JS                                                            */
/*(C) 2009, JESSE JAMES HELFRICH                                      */
/*                                                                    */
/*This controls the quote generator on JesseHelfrich.net.             */
/*If you are poking around in my javascript, it must mean you want    */
/*to know how something works or are looking for inspriation.         */
/*                                                                    */
/*Feel free to draw inspiration from this, but directly copying my    */
/*code without attributing it to me will be a clear violation of my   */
/*copyright and Terms of Use. For more information, use my contact    */
/*form at http://www.jessehelfrich.net/contact.php.                   */
/*                                                                    */
/*This is my first major javascript application and, as such, much    */
/*of my inpiration is drawn from the book "Learning Javascript" by    */
/*Shelley Powers. I recommend it for novice developers.               */
/*                                                                    */
/**********************************************************************/

quoteBank = new Array(
"You will come down soon, too. You will come down too soon.", //mouse
"You look so out of context in this gaudy apartment complex.", //postal service
"Cowboy Dan's a major player in the cowboy scene. He goes to the reservation, drinks and gets mean.", //mouse
"I like songs about drifters, books about the same. They both seem to make me feel a little less insane.", //mouse
"I get filled up on me and end. So turn off the light 'cause it's night on the Sun.", //mouse
"You're hopelessly hopeless. I hope so &mdash; for you.", //mouse
"You can be talented or you can be nice. Very few happen to be both.", //original
"Guy comes in looking a bit like everyone I ever seen. He moves just like Crisco disco; breath 100 percent Listerine.", //mouse
"Well, do you need a lot of what you've got to survive?", //mouse
"Never ascribe to malice that which is adequately explained by incompetence.", //Napoleon
"Let the human mind loose. It must be loose. It will be loose. Superstition and dogmatism cannot confine it.", //John Adams
"If we must choose between them, it is far safer to be feared than loved.", //Machevelli
"Mine are the troubles of better men. Thereby I do not better myself.", //original
"To be truthful means to employ the usual metaphors.", //Nietzsche
"A witticism is an epigram on the death of a feeling.", //Nietzsche
"Thoughts are the shadows of our feelings &mdash; always darker, emptier, simpler.", //Nietzsche
"I would not know what the spirit of a philosopher might wish more to be than a good dancer.", //Nietzsche
"We have art in order not to die of the truth.", //Nietzsche
"The deeds of the devil are ours as well. The ills of our forebears are the hypocrisy of now." //original
);

function pickRand() {
   return Math.floor(Math.random() * quoteBank.length);
}

function setWords() {
   var rand = pickRand();
   var txt = quoteBank[rand];
   document.getElementById("qcon").innerHTML = "&quot;" + txt + "&quot;";
}

timer = 5;

function changeWords() {
   timer = timer*1.2;
   var rand = pickRand();
   var txt = quoteBank[rand];
   document.getElementById("qcon").innerHTML = "&quot;" + txt + "&quot;";
   if(timer<500) {
      setTimeout("changeWords()", timer);
   } else {
      timer = 5;
   }
}
