// homeQuote.js
// Author: Adam Toda

/* This program places the quote text on the Learning Across Borders pages */

/* GLOBAL VARIABLES */

var authorArray = new Array("The Oregonian (Continental Harmony commission)",
				"Natural History (North American Taiko Conference report)",
				"The Advertiser (Hawaii Opera Theater collaboration)", 
				"The Morning Call, Pennsylvania",
				"The Japan Society", 
				"New York Times", 
				"Nadir (Tokyo)");

var defaultQuoteArray= new Array("I am sure that this experience is one that has affected my life most. I have learned new cultures, history, and, most of all, new ways to think about things. I believe that the key factor that makes this trip so special is the people that we meet along the way.",
			"This program means something huge and important for me.",
			"My purpose of this trip was finding things which I really want to do and finally, I found it.",
			"There is so much I've learned from this program. I've learned that people are the most interesting aspects of life and knowledge. It is because of 'people' that we are able to make a living and be satisfied with how we do so.",
			"I've never had such wonderful days of my life.", 
			"Even now I'm changing. I understand the importance of listening to other people and improving my thinking. I have been taught many things from all the members of this program. I could make really great friends like family.", 
			"The experiences from this program have had a great effect on my future.");

var burmaQuoteArray = new Array("These two weeks is very precious time to me, because this program is not sightseeing, we can know the daily life of people in Burma, what they think, how hard this country situation is.",
				"Visiting the home of a monk who studies at 'Intensity' was a great experience. On the way to his monastery, we went through areas that probably no foreigners visit. I could see the 'daily life' of people, which was especially meaningful for me.", 
				"This program means something huge and important for me.", 
				"I am sure that this experience is one that has affected my life most. I have learned new cultures, history, and, most of all, new ways to think about things. I believe that the key factor that makes this trip so special is the people that we meet along the way.",
				"Through talking to the people who actually live in each of the places that we visited, I was really able to get a sense of their views towards their country and the international society.", 
				"I have not found an answer to the questions that have risen in my mind, but I have definitely gained the ability to look at certain issues from a broader view.");

var SEAsiaQuoteArray = new Array("It was the best way to spend 17 days in Southeast Asia. I think that says a lot about this program.", 
				"This program was more interesting than I had imagined. I could discuss, meet with great professors, make friends with wonderful students in Southeast Asia.", 
				"The experiences from this program have had a great effect on my future.", 
				"This program gave me the experience of Southeast Asia by myself, a chance to think and express my own opinion in English, the discovery of problems, the motivation to study more from now on, and excellent friends who are my treasure.",
				"There is so much I've learned from this program. I've learned that people are the most interesting aspects of life and knowledge. It is because of 'people' that we are able to make a living and be satisfied with how we do so.",
				"I was especially happy that there were many occasions to communicate with young people living in Southeast Asia and feel their openness and friendliness and their thoughts on everything from favorite color to world affairs.",
				"At first I hesitated to speak English, feeling my English is bad. But people were so kind and heard with smile, so I can speak. Then I understand that important point is not grammar but zeal to communicate my feeling.", 
				"Even now I'm changing. I understand the importance of listening to other people and improving my thinking. I have been taught many things from all the members of this program. I could make really great friends like family.", 
				"My purpose of this trip was finding things which I really want to do and finally, I found it.");

/* FUNCTIONS */

function chooseQuote(sectionName) {
	// if the page is in the Burma Section
	if (sectionName.substring(0,5) == BURMA || sectionName.substring(0,5) == "Burma") {
		setQuote(burmaQuoteArray)
	}
	
	// if the page is in the Southeast Asia Section
	else if (sectionName.substring(0,6) == SE_ASIA || sectionName.substring(0,5) == "South") {
		setQuote(SEAsiaQuoteArray);
	}
	
	// if the page is in any other section
	else {
		setQuote(defaultQuoteArray);
	}
}

function setQuote(array) {
	var quoteNumber = Math.floor(Math.random() * array.length);
	var quote = array[quoteNumber];
	
	// the actual quote
	getObject("quote").innerHTML = quote;
	getObject("quoteAuthor").innerHTML = "- Program Participant";
	
	// for IE6 the content is also placed in the trasnparent background.
	getObject("quoteDouble").innerHTML = quote;
	getObject("quoteAuthorDouble").innerHTML = "- Program Participant";
}


/* FUNCTION getObject
 * ------------------
 * Helper function used to retrieve objects in web space.  Shorter form
 * of using the document.getElementById command.
 */

function getObject(obj) {
	if (document.getElementById) return document.getElementById(obj);
	else if (document.all) return document.all[obj];
}


/* END OF JAVASCRIPT CODE */

