var previousQuote = 0;

// 1ST FUNCTION: Quote choosing function w/ arrays of quotes and matching authors
function randomContent() {

// *********** The following two arrays are really all you have to change / add to *************
// Quotes - add as many as you want - change the 4 in "new Array(4)" to match number of quotes in both arrays (counting 0!)
var chosenQuote=new Array(4)
chosenQuote[0]="Melinda worked wonders for our family. My little girl was floundering in her regular classroom, falling farther behind all the time. Her IEP was woefully inadequate. Within a few months of working with Melinda, my daughter had the services she needed, and the change in her outlook was dramatic."
chosenQuote[1]="My English is not very good and I never understood the IEP for my daughter. Melinda helped her get the school and the services she needs so that she will be able to be in the regular class and graduate from school. She is our angel."
chosenQuote[2]="Melinda worked with one of my students. Her input and expertise was invaluable to his success in the mainstream classroom."
chosenQuote[3]="When I first met Melinda I was at an IEP as a teacher for one of my students. My own grandson was not receiving the services he needed from his IEP team. After Melinda helped us, he began to receive the program and services he needed. My daughter and I were finally able to relax and enjoy him as he continues to improve."
chosenQuote[4]="After working with Melinda for many students, I can attest to the fact that she always has the interest of the child first and foremost in her thoughts. She maintains such a positive relationship with the school district."
chosenQuote[5]="Melinda is very knowledgeable when it comes to working with students who have cochlear implants. She knows exactly where and what students lack and is very supportive in helping with the students to be as successful as possible. With her background and knowledge from having a daughter who has a CI, she is able to support students and teachers with what needs to be done to help everyone involved in their education."

// Quote Authors - match numbers w above quotes
var chosenQuoteAuthor=new Array(4)
chosenQuoteAuthor[0]=" - Perri, Santa Clarita"
chosenQuoteAuthor[1]=" - Jose & Griselda, LA"
chosenQuoteAuthor[2]=" - Teacher, BHUSD"
chosenQuoteAuthor[3]=" - Jeannette, LAUSD"
chosenQuoteAuthor[4]=" - Asst. Principal, LAUSD"
chosenQuoteAuthor[5]=" - Alecia, EMUSD"

var getRan = Math.floor(Math.random()*chosenQuote.length);
while (previousQuote == getRan) {
	var getRan = Math.floor(Math.random()*chosenQuote.length);
	}

previousQuote = getRan;
var quote="<p class='quote'>\""+chosenQuote[getRan]+"\"</p><p class='author'>"+chosenQuoteAuthor[getRan]+"</p>";
return quote;
}


// 2ND FUNCTION: Toggle quote in Div function on link click
function WriteLayer(ID,parentID) {
	var sText = randomContent();
	
	if (document.layers) {
		var oLayer = (parentID) ? eval('document.' + parentID + '.document.' + ID + '.document') : document.layers[ID].document;
		oLayer.open();
		oLayer.write(sText);
		oLayer.close();
	}
	else if (document.all) document.all[ID].innerHTML = sText;
	else if (parseInt(navigator.appVersion)>=5&&navigator.appName=="Netscape") {
		document.getElementById(ID).innerHTML = sText;
	}
}

// code: www.thetravelertravels.net
// using some of this: http://www.sitepoint.com/article/layers-content-javascript
