/**
 * @author Hannah Kleyn
 */
		window.onload=initAll;  
		
//**********************************
//Ajax Update content functions.  All of these functions, upon clicking the text link in the navigation div, bring up new content from appropriate html files
// in my content div.  I should probably (definitely) have used an array to do this, but I'm not quite sure how I should begin going about doing that.
//**********************************

		
		function changeToResume(){
			var content = $("content");
			var myAjax = new Ajax.Updater(
				"content",
				"resume.html",
				{
					method: 'get',
					onComplete: showResponse
				}
			);	
		} //end function
		
		function changeToGraphic(){
			var content = $("content");
			var myAjax = new Ajax.Updater(
				"content",
				"graphicDesign.html",
				{
					method: 'get',
					onComplete: showResponse
				}
			);	
		} //end function
		
		function changeToFiber(){
			var content = document.getElementById("content");
			var myAjax = new Ajax.Updater(
				"content",
				"fiber.html",
				{
					method: 'get',
					onComplete: showResponse
				}
			);	
		} //end function
		
		function changeToWeb(){
			var content = $("content");
			var myAjax = new Ajax.Updater(
				"content",
				"web.html",
				{
					method: 'get',
					onComplete: showResponse
				}
			);	
		} //end function
		
		function changeToDrawing(){
			var content = $("content");
			var myAjax = new Ajax.Updater(
				"content",
				"drawing.html",
				{
					method: 'get',
					onComplete: showResponse
				}
			);	
		} //end function
		
		function changeToStudent(){
			var content = $("content");
			var myAjax = new Ajax.Updater(
				"content",
				"student.html",
				{
					method: 'get',
					onComplete: showResponse
				}
			);	
		} //end function
		
		function changeToTravel(){
			var content = $("content");
			var myAjax = new Ajax.Updater(
				"content",
				"travel.html",
				{
					method: 'get',
					onComplete: showResponse
				}
			);	
		} //end function
		
		function changeToDreams(){
			var content = $("content");
			var myAjax = new Ajax.Updater(
				"content",
				"dreams.html",
				{
					method: 'get',
					onComplete: showResponse
				}
			);	
		} //end function
		
		function changeToWriting(){
			var content = $("content");
			var myAjax = new Ajax.Updater(
				"content",
				"writing.html",
				{
					method: 'get',
					onComplete: showResponse
				}
			);	
		} //end function
		
		function changeToInterests(){
			var content = $("content");
			var myAjax = new Ajax.Updater(
				"content",
				"interests.html",
				{
					method: 'get',
					onComplete: showResponse
				}
			);	
		} //end function
		
		function changeToBlog(){
			var content = $("content");
			var myAjax = new Ajax.Updater(
				"content",
				"blog.html",
				{
					method: 'get',
					onComplete: showResponse
				}
			);	
		} //end function
		
		function showResponse(originalRequest){
			$("content") = (originalRequest.responseText);
		} // end function

//*****************************************
//open window functions... I started this way but then nixed the array and stuck with inline functions because last night I didn't know about onload calls 
//cancelling eachother out... I'll change it back later some other time
//*****************************************
	
	function newWinLinks(){
		for (var i=0; i<document.links.length; i++){
			if (document.links[i].className == "newWin"){
				document.links[i].onclick = newWindow;
			}
		}
	}
	
	function newWindow(){
		var graphicWindow = window.open("this.href","graphicWindow","width=400,height=600");
		graphicWindow.focus();
		return false;
	}



//*****************************************
//travel slideshow array and functions.  This array has a caption text for each image in my travel image folder.  
//*****************************************		
		
	var currImg = 1;
	var captionText = new Array(
		"This was when my family and I went to the moon.  Just kidding.  Amidst the steam in Yellowstone National Park.",
		"Up close and personal with the bison in Yellowstone.  Good thing my dad herds cattle or I might have been a little freaked out.",
		"Photo Op with Lady Liberty in New York City",
		"Trump World Tower.",
		"Scuola Internazionale di Grafica... ah, my school in Venice, Italy.",
		"The endless maze of canals in Venice.",
		"Gondoliers.",
		"The elegant Salzburg, Austria.  The only city that can pull off having every building painted in pastel hues.",
		"Salzburg -- where else are harpists the street musicians?",
		"I'm a fool who climbs mountains with a broken foot.",
		"The dome of Basilica San Pietro, Vatican City.",
		"Roma, under [de/con]struction.",
		"Bruneleschi's Duomo.  Who doesn't take this picture in Florence?",
		"A wonderful chalk artist in Florence replicating Caravaggio.",
		"A storm looming over Munich, Germany.",
		"Hofbrauhaus.  Brass Band, Bier, and Liederhosen.",
		"Along the canals of Amsterdam.",
		"Hanging out with the cattle on the countryside just northwest of Amsterdam.",
		"Alpine flora on the mountains of Switzerland.",
		"Good day for a hike in the Alps?  I'd say so.",
		"Aida, the opera in the Arena, in Verona, Italy.",
		"Giardini Giusto, Verona.",
		""
		)
	
	function initAll(){
		document.getElementById("caption").innerHTML=captionText[0];
		document.getElementById("prevLink").onClick=processPrevious;
		document.getElementById("nextLink").onClick=processNext;
	}	
	//this function calls the newSlide function below and sets the parameter (later called direction) to -1 so that the image number decreases to go back an image
	function processPrevious(){
		newSlide(-1);
	}
	//this function does just the opposite of the above.  Calls the newSlide function below and sets the parameter to 1 so the image number goes forward one 
	function processNext(){
		newSlide(1);
	}
	// this function controls all the changing of images, either forward or backward
	function newSlide(direction){
		//declares a variable... an integer based on how many elements are in my captionText array above
		var imgCount = captionText.length;
		
		//the image currently displayed will be the current image number plus or minus 1 (direction)
		currImg = currImg + direction;
		//if the currImg is less than 1, set the image count to the end of the array (total count -1... the last array item is empty)
		if (currImg<1){
			currImg=imgCount-1;
		}
		if (currImg == imgCount){
			currImg = 1;
		}
		//sets the slideshow div id content to the appropriate number's image
		document.getElementById("slideshow").src = "travel/" + currImg + ".jpg";
		//sets the caption divs content in the HTML to the appropriate array element
		document.getElementById("caption").innerHTML = captionText[currImg-1];
	}