// 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 photos=new Array();	
	var which=0;
	var photocounter = 16;
	
	// defining location where pictures can be found
	var picturelocation = "images/safetyhumor";
	

	/*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. 
	
	photos[0]="break.jpg";
	photos[1]="bull.jpg";
	photos[2]="farmsafe4.jpg";
	photos[3]="farmsafe5.jpg";
	photos[4]="farmsafe6.jpg";
	photos[5]="farmsafe7.jpg";
	photos[6]="farmsteadhazzards.jpg";
	photos[7]="gasdynamite.jpg";
	photos[8]="icehouse.jpg";
	photos[9]="makeshiftfence.jpg";
	photos[10]="nailsinfence.jpg";
	photos[11]="oneaccident.jpg";
	photos[12]="safetyhumor1.jpg";
	photos[13]="safetyhumor2.jpg";
	photos[14]="safetyhumor3.jpg";
	photos[15]="safetyhumor4.jpg";
	photos[16]="safetyhumor5.jpg";
	photos[17]="safetyhumor6.jpg";
	photos[18]="safetyhumor7.jpg";
	photos[19]="spraying.jpg";	

	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 (which>0)
		{			
			which--			
			document.getElementById("campimage").innerHTML = "<div align='center'><img src='" + picturelocation + "/" + photos[which] + "'></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 (which<photocounter-1)
		{
			which++						
			document.getElementById("campimage").innerHTML = "<div align='center'><img src='" + picturelocation + "/" + photos[which] + "'></div>";
		}		
	}
	
	
-->	

