// JavaScript Document


<!--
/*
	WHAT CHANGES TO MAKE TO SHOW PICTURES?
	1) If a folder is added make sure an array is created too
	e.g. if a folder called brookings is added, add an array
	here which looks like
	var brookings=new Array();
	
	2) if a new year's data is to be shown, make sure that 
	pictureyear variable is changed
	e.g. to enable pictures for 2005, make this change
	var pictureyear=2005
	
	3) lets say, 2005 folder has pictures for only bennet
	in the folder ...whatever\2005\bennet. I that happens, 
	do this --
	
	  (a) comment all other arrays. Use // to comment
	  e.g. to comment coddinton array variable
	  //var coddington=new Array();
	  Notice the // (two forward slashes) used for commenting
	  
	  (b) also make sure that other radio buttons are commented
	  In HTML, comments are put between <!-- and -->
	  e.g. to comment coddington's radio button,
	  <!--
	  <input type="radio" name="placeinfo" value="coddington" onClick="resetwhich('coddington')">
        Coddington
	  -->
	  another e.g. comment a group of radio buttons,
	  <!--
	  <input type="radio" name="placeinfo" value="coddington" onClick="resetwhich('coddington')">
        Coddington
	  <input type="radio" name="placeinfo" value="brookings" onClick="resetwhich('brookings')">
        Brookings
	  -->
	
		(c) populate an array manually as you see in EXAMPLE ARRAY.
	
		(d)	Make sure that 'place' variable is set to the first array declared
		e.g. if var brookings=new Array(); is declared, your 'place' variable should be
		var place="brookings";
		and your 'placecounter' variable should be the count of pictures populated 
		in the array.
		
		(e) literally go through each and every line and add clauses accordingly. Once you get it,
		it becomes very easy to change something.
	  
	
*/	


	// defining our arrays here
	var bennet=new Array();
	var coddington=new Array();
	var deuel=new Array();
	var hutchinson=new Array();
	var lake=new Array();
	var moody=new Array();
	
	// defining constants here
	var pictureyear=2004;
	var which=-1;
	
	// initializing place and its counter (which is the number of arrays; 0 to 15 means 16 arrays
	var place="bennet";
	var placecounter = 16;
	
	// defining location where pictures can be found
	var picturelocation = "images/Yearbookpictures";
	

	/*Change the below variables to reference your own images. You may have as many images in the slider as you wish*/
	/*
	EXAMPLE ARRAY:
	--------------
	bennet[0]="Ambulance.jpg";
	bennet[1]="AnimalSafety2.jpg";
	bennet[2]="AnimalSafety.jpg";
	bennet[3]="ClemDannySandyTomJ.jpg";
	bennet[4]="Electrical.jpg";
	*/
	
	
	// if folder bennet has 3 pictures, array should run from 0 to 2
	// and each element should be populated with the name of the file
	// IMPORTANT: MAKE SURE THE FILENAME IS REALLY SIMPLE - NO SPACES
	// NO DASHES ETC. 
	
	bennet[0]="Ambulance.jpg";
	bennet[1]="AnimalSafety2.jpg";
	bennet[2]="AnimalSafety.jpg";
	bennet[3]="ClemDannySandyTomJ.jpg";
	bennet[4]="Electrical.jpg";
	bennet[5]="GrainHandling.jpg";
	bennet[6]="Group.jpg";
	bennet[7]="EMTs2.jpg";
	bennet[8]="EMTs.jpg";
	bennet[9]="Fire2.jpg";
	bennet[10]="FireSafety.jpg";
	bennet[11]="Group2.jpg";
	bennet[12]="Group3.jpg";
	bennet[13]="GunSafety.jpg";
	bennet[14]="SandyTyler.jpg";
	bennet[15]="TractorSafety.jpg";
	
	coddington[0]="91104.jpg";
	coddington[1]="animalsaf04.jpg";
	coddington[2]="bicycle04jpg.jpg";
	coddington[3]="electr04.jpg";
	coddington[4]="electric04.jpg";
	coddington[5]="firesaf04.jpg";
	coddington[6]="firstaid04.jpg";
	coddington[7]="FlowGrain04.jpg";
	coddington[8]="hiddenhaz04.jpg";
	coddington[9]="highpatr04.jpg";
	coddington[10]="highpatrol04.jpg";
	coddington[11]="pestic04jpg.jpg";
	coddington[12]="pesticsaf04.jpg";
	coddington[13]="ptosaf04.jpg";
	coddington[14]="tobacco04.jpg";
	coddington[15]="tobacco04jpg.jpg";
	coddington[16]="weathsaf04.jpg";
	coddington[17]="westnile04.jpg";
	
	deuel[0]="SOFY015.jpg";
	deuel[1]="SOFY016.jpg";
	deuel[2]="SOFY017.jpg";
	deuel[3]="SOFY018.jpg";
	deuel[4]="SOFY019.jpg";
	deuel[5]="SOFY020.jpg";
	
	hutchinson[0]="Ambulance.JPG";
	hutchinson[1]="AnimalSafety.JPG";
	hutchinson[2]="ATVTracey3.JPG";
	hutchinson[3]="ATVTracey.JPG";
	hutchinson[4]="BicycleLyle2.JPG";
	hutchinson[5]="BoGeidelHose.JPG";
	hutchinson[6]="BradHenke2.jpg";
	hutchinson[7]="Fire.JPG";
	hutchinson[8]="FuterFirefighter.JPG";
	hutchinson[9]="Games.JPG";
	hutchinson[10]="GrainPull2.JPG";
	hutchinson[11]="GrainPull.JPG";
	hutchinson[12]="GroupPix06302004.jpg";
	hutchinson[13]="GunSafety.JPG";
	hutchinson[14]="IknowIknow.JPG";
	hutchinson[15]="JerryBertsch.jpg";
	hutchinson[16]="JonDarin.JPG";
	hutchinson[17]="ModelFarm2.JPG";
	hutchinson[18]="ModelFarmMaggie.JPG";
	hutchinson[19]="PTO2.JPG";
	hutchinson[20]="PTO4.JPG";
	hutchinson[21]="Thisiscool.JPG";
	hutchinson[22]="TobaccoColleen.JPG";
	hutchinson[23]="Weather1Jerrid.JPG";
	hutchinson[24]="Weather4Jerrid.JPG";
	hutchinson[25]="Wet.JPG";
	hutchinson[26]="WhosDrivingtheTruck.JPG";
	hutchinson[27]="WNV4.JPG";
	hutchinson[27]="WNVJustin.JPG";
	
	lake[0]="boat.JPG";
	lake[1]="P1010025.JPG";
	lake[2]="P1010026.JPG";
	lake[3]="P1010027.JPG";
	lake[4]="P1010028.JPG";
	lake[5]="P1010029.JPG";
	lake[6]="P1010030.jpg";
	lake[7]="tractor.JPG";
	lake[8]="P1010032.JPG";
	lake[9]="P1010033.JPG";
	lake[10]="P1010034.JPG";
	lake[11]="P1010035.JPG";
	lake[12]="P1010040.jpg";
	lake[13]="P1010037.JPG";
	lake[14]="P1010038.JPG";
	lake[15]="P1010039.jpg";

	moody[0]="100_0308.JPG";
	moody[1]="100_0310.JPG";
	moody[2]="100_0311.JPG";
	moody[3]="100_0313_0001.JPG";
	moody[4]="100_0315.JPG";
	moody[5]="100_0316.JPG";
	moody[6]="100_0317.JPG";
	moody[7]="100_0318.JPG";
	
	function resetwhich (whichplace)
	{
		which=-1;
		place = whichplace;
		document.getElementById("campimage").innerHTML = "<img src='images/Yearbookpictures/starting.jpg'>";
		
		// add or comment statement(s) here as necessary. 		
		
		if (whichplace == "bennet")
		{
			placecounter = bennet.length;
			document.getElementById("campimage").innerHTML = "<div align='left'>Bennet County held their SOFY camp on May 26th, 2004.  They had 68 participants, with 27 volunteers helping coordinate the event.  Bennet County was privileged to have a wide variety of guest speakers for the education of the youth.</div>";
		}
		else if (whichplace == "coddington")
		{
			placecounter = coddington.length;
			document.getElementById("campimage").innerHTML = "<div align='left'>Coddington County held their SOFY camp on July 15th, 2004 at the Coddington County Extension Complex.  They had 90 participants ranging in age from 7 to 12 years old, with 28 volunteers helping coordinate the event.  Coddington County was privileged to have a wide variety of guest speakers for the education of the youth.</div>";
		}
		else if (whichplace == "hutchinson")
		{			
			placecounter = hutchinson.length;
			document.getElementById("campimage").innerHTML = "<div align='left'>Hutchinson County held their SOFY camp on June 30th, 2004 at the Parkston High School.  They had 102 participants ranging in age from 6 to 14 years old, with 15 volunteers helping coordinate the event.  Hutchinson County was privileged to have a wide variety of guest speakers for the education of the youth.</div>";
		}
		else if (whichplace == "lake")
		{
			placecounter = lake.length;
			document.getElementById("campimage").innerHTML = "<div align='left'>Lake County held their SOFY camp on September 22nd, 2004 at the Lake County 4-H Grounds.  They had 125 participants ranging in age from 8 to 12 years old, with 17 volunteers helping coordinate the event.  Lake County was privileged to have a wide variety of guest speakers for the education of the youth.</div>";
		}
		else if (whichplace == "deuel")
		{
			placecounter = deuel.length;
			document.getElementById("campimage").innerHTML = "<div align='left'>Deuel County held their SOFY camp on May 26th, 2004 at the Deuel County Fairgrounds.  They had 43 participants ranging in age from 6 to 12 years old, with 15 volunteers helping coordinate the event.  Deuel County was privileged to have a wide variety of guest speakers for the education of the youth.</div>";
		}
		else if (whichplace == "moody")
		{
			placecounter = moody.length;
			document.getElementById("campimage").innerHTML = "<div align='left'>Moody County held two SOFY camps on May 6th, 2004 at the Moody County Fairgrounds.  They had 161 participants ranging in age from 8 to 12 years old, with 21 volunteers helping coordinate the event.  Moody County was privileged to have a wide variety of guest speakers for the education of the youth.</div>";
		}
		else if (whichplace == "beadle")
		{
			placecounter = 0;
			document.getElementById("campimage").innerHTML = "<div align='left'>Beadle County held their SOFY camp on May 1st, 2004 at the SD State Fairgrounds.  They had 54 participants ranging in age from 8 to 12 years old, with 20 volunteers helping coordinate the event.  Beadle County was privileged to have a wide variety of guest speakers for the education of the youth including some first hand knowledge from accident victims.</div>";
		}
		else if (whichplace == "brown")
		{
			placecounter = 0;
			document.getElementById("campimage").innerHTML = "<div align='left'>Brown County held their SOFY camp on June 23rd, 2004 at the Brown County Fairgrounds.  They had 141 participants ranging in age from 6 to 12 years old, with 20 volunteers helping coordinate the event.  Brown County was privileged to have a wide variety of guest speakers for the education of the youth.</div>";
		}
		else if (whichplace == "corson")
		{
			placecounter = 0;
			document.getElementById("campimage").innerHTML = "<div align='left'>Corson County held their SOFY camp on May 6th, 2004 at the SMEE School in Wakapala.  They had 94 participants ranging in age from 6 to 11 years old, with 12 volunteers helping coordinate the event.</div>";
		}
		else if (whichplace == "faulk")
		{
			placecounter = 0;
			document.getElementById("campimage").innerHTML = "<div align='left'>Faulk County held their SOFY camp on May 27th, 2004 at the Faulkton Fairgrounds.  They had 44 participants ranging in age from 8 to 13 years old, with 16 volunteers helping coordinate the event.  Faulk County was privileged to have a wide variety of guest speakers for the education of the youth.</div>";
		}
		else if (whichplace == "grant")
		{
			placecounter = 0;
			document.getElementById("campimage").innerHTML = "<div align='left'>Grant County held their SOFY camp on June 28th, 2004 at the Midwest Dairy Institute in Milbank.  They had 34 participants ranging in age from 8 to 13 years old, with 23 volunteers helping coordinate the event.  Grant County was privileged to have a wide variety of guest speakers for the education of the youth including some first hand knowledge from a farm accident victim.</div>";
		}
		else if (whichplace == "hand")
		{
			placecounter = 0;
			document.getElementById("campimage").innerHTML = "<div align='left'>Hand County held two SOFY camps on April 8th, 2004.  The camps were at the Millerdale Hutterite Colony and the Miller Elementary School.  They had 96 participants ranging in age from 6 to 12 years old, with 4 volunteers helping coordinate the event.  Hand County was privileged to have a wide variety of guest speakers for the education of the youth.</div>";
		}
		else if (whichplace == "hughes")
		{
			placecounter = 0;
			document.getElementById("campimage").innerHTML = "<div align='left'>Hughes and Stanley County held their SOFY camp on June 29th, 2004.  They had 100 participants ranging in age from 8 to 12 years old, with 19 volunteers helping coordinate the event.  Hughes and Stanley County were privileged to have a wide variety of guest speakers for the education of the youth.</div>";
		}
		else if (whichplace == "hyde")
		{
			placecounter = 0;
			document.getElementById("campimage").innerHTML = "<div align='left'>Hyde County held their SOFY camp on May 26th, 2004 at the Hyde County Memorial Auditorium.  They had 36 participants ranging in age from 6 to 13 years old, with 10 volunteers helping coordinate the event.  Hyde County was privileged to have a wide variety of guest speakers for the education of the youth.</div>";
		}
		else if (whichplace == "marshall")
		{
			placecounter = 0;
			document.getElementById("campimage").innerHTML = "<div align='left'>Marshall County held their SOFY camp on June 1st, 2004 at the Marshall Field.  They had 40 participants ranging in age from 8 to 12 years old, with 21 volunteers helping coordinate the event.  Marshall County was privileged to have a wide variety of guest speakers for the education of the youth.</div>";
		}
		else if (whichplace == "spink")
		{
			placecounter = 0;
			document.getElementById("campimage").innerHTML = "<div align='left'>Spink County held two SOFY camps on April 7th and 17th, 2004 at the Tulare Elementary School and the Glendale Hutterite School.  They had 45 participants ranging in age from 4 to 13 years old, with 4 volunteers helping coordinate the event.  Spink County was privileged to have a wide variety of guest speakers for the education of the youth.</div>";
		}
		else if (whichplace == "ziebach")
		{
			placecounter = 0;
			document.getElementById("campimage").innerHTML = "<div align='left'>Ziebach County held their SOFY camp on April 19th, 2004 at the Dupree School.  They had 70 participants ranging in age from 8 to 12 years old, with 15 volunteers helping coordinate the event.  Ziebach County was privileged to have a wide variety of guest speakers for the education of the youth.</div>";
		}		
	}

	function backward()
	{
		// add or comment statement(s) here as necessary. Notice that anything
		// under "which--" till you encounter "}" is common between the functions
		// backward	and forward
		
		if (place=="bennet" || place=="coddington" || place=="hutchinson" || place=="lake" || place=="deuel" || place=="moody")
		{		
			if (which>0)
			{			
				which--			
				innerhtml(which)
			}
		}
		
	}	
	
	function innerhtml (which)
	{
			if (place == "bennet")
				document.getElementById("campimage").innerHTML = "<div align='center'><a href='" + picturelocation + "/" + pictureyear + "big/" + place + "/" + bennet[which] + "' target='_blank'>" + "<img src='" + picturelocation + "/" + pictureyear + "/" + place + "/" + bennet[which] + "'></a></div>";
			else if (place == "coddington")
				document.getElementById("campimage").innerHTML = "<div align='center'><a href='" + picturelocation + "/" + pictureyear + "big/" + place + "/" + coddington[which] + "' target='_blank'>" + "<img src='" + picturelocation + "/" + pictureyear + "/" + place + "/" + coddington[which] + "'></a></div>";
			else if (place == "hutchinson")
				document.getElementById("campimage").innerHTML = "<div align='center'><a href='" + picturelocation + "/" + pictureyear + "big/" + place + "/" + hutchinson[which] + "' target='_blank'>" + "<img src='" + picturelocation + "/" + pictureyear + "/" + place + "/" + hutchinson[which] + "'></a></div>";
			else if (place == "deuel")
				document.getElementById("campimage").innerHTML = "<div align='center'><a href='" + picturelocation + "/" + pictureyear + "big/" + place + "/" + deuel[which] + "' target='_blank'>" + "<img src='" + picturelocation + "/" + pictureyear + "/" + place + "/" + deuel[which] + "'></a></div>";
			else if (place == "lake")
				document.getElementById("campimage").innerHTML = "<div align='center'><a href='" + picturelocation + "/" + pictureyear + "big/" + place + "/" + lake[which] + "' target='_blank'>" + "<img src='" + picturelocation + "/" + pictureyear + "/" + place + "/" + lake[which] + "'></a></div>";
			else if (place == "moody")
				document.getElementById("campimage").innerHTML = "<div align='center'><a href='" + picturelocation + "/" + pictureyear + "big/" + place + "/" + moody[which] + "' target='_blank'>" + "<img src='" + picturelocation + "/" + pictureyear + "/" + place + "/" + moody[which] + "'></a></div>";
	}
	
	function forward ()		
	{		
	
		// add or comment statement(s) here as necessary. Notice that anything
		// under "which++" till you encounter "}" is common between the functions
		// forward and backward
		if (place=="bennet" || place=="coddington" || place=="hutchinson" || place=="lake" || place=="deuel" || place=="moody")
		{	
			if (which<placecounter-1)
			{
				which++						
				innerhtml(which)
			}
		}
		
	}
	
	
-->	

