﻿var quotes = new Array(13);
var authors = new Array(13);
var titles = new Array(13);

quotes[0] = "That’s the point. It goes like this: Teaching is touching life.";
quotes[1] = "We should acknowledge differences, we should greet differences, until difference makes no difference anymore."
quotes[2] = "What the statistics don’t tell us is the closeness of the relationship. Hispanic families are very cohesive, spending much time together."
quotes[3] = "If you win non-violently, then you have a double victory, you have not only won your fight, but you remain free."
quotes[4] = "Personally, I believe that our American system works as long as you participate in it. You must vote and make your voice heard. Otherwise you will be left out."
quotes[5] = "There is nothing harder than the softness of indifference."
quotes[6] = "Familia is the very center of Latino culture. I don’t feel the media has really seen that. It is the strongest thing about us and the most universal."
quotes[7] = "If you are ready to criticize a system, be equally ready to offer assistance to improve it."
quotes[8] = "Live so that when your children think of fairness and integrity, they think of you."
quotes[9] = "What lies behind us and what lies ahead of us are tiny matters compared to what lives within us."
quotes[10] = "Whenever you do a thing, act as if all the world were watching."
quotes[11] = "Most of the important things in the world have been accomplished by people who have kept on trying when there seemed to be no hope at all."
quotes[12] = "Among individuals, as among nations, respect for the rights of others is peace."

authors[0] = "Jaime Escalante";
authors[1] = "Dr. Adela A. Allen"
authors[2] = "Mercedes Alvarez"
authors[3] = "Cesar Chavez"
authors[4] = "Mari-Luci Jaramillo"
authors[5] = "Juan Montalvo"
authors[6] = "Gregory Nava"
authors[7] = "Armando Sanchez"
authors[8] = "H. Jackson Brown Jr."
authors[9] = "Ralph Waldo Emerson"
authors[10] = "Thomas Jefferson"
authors[11] = "Dale Carnegie"
authors[12] = "Benito Juarez"

titles[0] = "Educator"
titles[1] = "Educator"
titles[2] = "Businesswoman"
titles[3] = "Director of the United Farm Workers"
titles[4] = "Educator, Diplomat"
titles[5] = "Ecuadorean essayist, political writer"
titles[6] = "Filmaker"
titles[7] = "Educator"

function getWeeklyQuote() {
	//get current time/date
	var now = new Date();
		
	//quotes through August 1 2010
	var from = new Date( 2010, 10, 7 );
	
	//difference  from now to through
	var diff = from - now;
	
	//convert week from milliseconds to week number 
	var week = diff / 1000 / 60 / 60 / 24 / 7;
	
	//change week number to start with zero
	week = 365/7 - week;
			
	//convert week number from decimal to integer
	week = parseInt( week );
	
	//week (number) becomes index of arrays 
	var index = week;
	
	//display the quotation
	var q = "\"" + quotes[index] + "\"";
	var a = "<p/>" + "--" + authors[index];
	
	var t = "";
	if ( index <= 7 ) 
		t = "<p/>" + "(" + titles[index] + ")";
	
	document.getElementById("weeklyquote").innerHTML = q + a + t;
}


