// JavaScript Document

function WriteEmail(userId, domain, topLevel)
{
	document.write("<a href=\"mailto:");
	document.write(userId);
	document.write("@");
	document.write(domain);
	document.write(".");
	document.write(topLevel);
	document.write("\">");
	document.write(userId);
	document.write("@");
	document.write(domain);
	document.write(".");
	document.write(topLevel);
	document.write("</a>");
} // WriteEmail

function WriteHeadBanner()
{
	var numImages = 5;
	index = Math.floor(Math.random() * numImages);
	var imageString = "img/headerbar/hb" + index + ".png";
	var outStr = "<" + "img src=\"" + imageString + "\" width=\"950\" height=\"100\" alt=\"Florida Symphony Youth Orchestra\" align=\"right\">";
	document.writeln(outStr);
}

function WriteSeniorQuote()
{
	var numQuotes = 7;	// the number of quotes
	ndx = Math.floor(Math.random() * numQuotes);
	
	var arQuotes = new Array(numQuotes);
	var arCite = new Array(numQuotes);
	var arImages = new Array(numQuotes);
	
	arQuotes[0] = "The FSYO is an incredibly enriching experience and has without a doubt taught me that with hard work, responsibility and dedication, nothing is impossible.";
	arCite[0] = "Caitlin Pequignot, 2010 alumnus attending Yale University";	
	arImages[0] = "img/senior_pic/pequignot.jpg";
	
	arQuotes[1] = "The Florida Symphony Youth Orchestra gave me the incredible opportunity to perform professional repertoire with skilled musicians who share the same passion for orchestral music as I do. My years with FSYO have bolstered my musicality, prepared me for collegiate music studies, emboldened my love of symphony orchestra music, and given me countless rewarding memories.";
	arCite[1] = "Scott Hartman, 2010 alumnus attending DePaul University";	
	arImages[1] = "img/senior_pic/hartman.jpg";
	
	arQuotes[2] = "When I joined FSYO it was thanks to my parents, so I went in wondering why I was wasting my Sundays, but after the first rehearsal I couldn't wait for the next week. Since joining FSYO I have learned numerous skills and made friends that will last a lifetime, and wouldn't trade the experience for anything else.";
	arCite[2] = "Susan Senseman, 2010 alumnus attending the University of Florida";	
	arImages[2] = "img/senior_pic/senseman.jpg";
	
	arQuotes[3] = "FSYO has provided me with a musical experience that has allowed me to play music that I would not get to play otherwise, with people I will remember forever.";
	arCite[3] = "Ryan McDonnell, 2011 alumnus attending Purdue University";	
	arImages[3] = "img/senior_pic/ryan_mcdonnell_72x105.jpg";

	arQuotes[4] = "FSYO has inspired and challenged me to grow as a musician in ways I'd never imagined possible, and I will always cherish my memories of it.";
	arCite[4] = "Melissa Roeder, 2011 alumus attending Florida State Univeristy";	
	arImages[4] = "img/senior_pic/melissa_roeder_78x105.jpg";
	
	arQuotes[5] = "FSYO has provided a place where students with the same passion and skill level in music, come together and play exciting and challening music.";
	arCite[5] = "Giancarlo Licitra, 2011 alumnus attending Florida State University";	
	arImages[5] = "img/senior_pic/giancarlo_105x105.jpg";
	
	arQuotes[6] = "More than anything, FSYO made me realize that I wanted to make a career out of what had simply been my growing passion for music. From my first rehearsal to my last performance, playing in FSYO convinced me that playing the bassoon was what I wanted to do for the rest of my life.";
	arCite[6] = "Mike Muszynski, 2001 Alumnus of FSYO, Principal Bassoon, Atlanta Opera Orchestra, Atlanta Ballet ";	
	arImages[6] = "img/senior_pic/MikeMuszynskiBassoon_67x105.jpg";				
	
	// now output one of them to be displayed.
	
	var tableStr = "<tab" + "le border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"margin:0px; padding:0px;\" ><tr><td style=\"border-width:0px; text-align:right; vertical-align:top; font-size:1.1em;\">";
	var quoteStr = "\"" + arQuotes[ndx] + "\"";
	var citeStr =  "<br /><span style=\"font-family: arial, serif;font-size:0.9em; font-style:italic; \">" + arCite[ndx] + "</span></td><td style=\"border-width:0px; text-align:right;\">";
	var imgStr = "<img src=\"" + arImages[ndx] + "\" alt=\"" + arCite[ndx] + "\" /></td></tr></table>";
	
	document.write(tableStr + quoteStr + citeStr + imgStr);
}

// for google checkout
function validateAmount(amount){
	if(amount.value.match( /^[0-9]+(\.([0-9]+))?$/)){
	return true;
	}else{
	alert('You must enter a valid donation.');
	amount.focus();
	return false;
	}
}

