// note:	items delineated with double forward slashes are only documentation, not part of the code.



// -------------------------------------------







// Created By: Marie Pelkey 2002



// Code Purpose: to get current month and correspond an image and link to that month







// -------------------------------------------



// HOW THIS CODE WORKS



// -------------------------------------------







// These 2 lines get the current month







	var now = new Date();



	var month = now.getMonth();







// These 3 lines define the variables







	var isMonth = "";         // the name of the month



	var ftrTitle = "";            // the name of the property



	var ftrImg = "";             // the file for the image



	var ftrURL = ""; 	    // the page describing the feature







// This next part does all the work.



// It first asks what the current month is, and corresponds it to a number



//	note: The months run from 0 through 11, January through December, respectively.



// Then the variables are defined for each month.











// THE "ARRAY"



if (now.getMonth() == 0) { isMonth = "January"; ftrTitle="Masons Mill"; ftrImg="mason3.jpg"; ftrURL="masonsmill.html"}



if (now.getMonth() == 1) { isMonth = "February"; ftrTitle="Masons Mill"; ftrImg="mason3.jpg"; ftrURL="masonsmill.html"}



if (now.getMonth() == 2)  { isMonth = "March";  ftrTitle="Dunham Woods";ftrImg="dunhamwoods.jpg"; ftrURL="dunhamwoods.html"}



if (now.getMonth() == 3)  { isMonth = "April"; ftrTitle="Dunham Woods"; ftrImg="dunhamwoods.jpg"; ftrURL="dunhamwoods.html"}



if (now.getMonth() == 4)  { isMonth = "May"; ftrTitle="Dunham Woods"; ftrImg="dunhamwoods.jpg"; ftrURL="dunhamwoods.html"}



if (now.getMonth() == 5)  { isMonth = "June"; ftrTitle="Dunham Woods"; ftrImg="dunhamwoods.jpg"; ftrURL="dunhamwoods.html"}



if (now.getMonth() == 6)  { isMonth = "July";  ftrTitle="Dunham Woods"; ftrImg="dunhamwoods.jpg"; ftrURL="dunhamwoods.html"}



if (now.getMonth() == 7)  { isMonth = "August";  ftrTitle="Knowlton Hill Preserve"; ftrImg="knowltn3.jpg"; ftrURL="knowltonhill.html"}



if (now.getMonth() == 8)  { isMonth = "September"; ftrTitle="Church Farm"; ftrImg="churchfarm1.jpg"; ftrURL="churchfarm.html"}



if (now.getMonth() == 9)  { isMonth = "October";  ftrTitle="Volunteers help out at Preston Nature Sanctuary"; ftrImg="images/volunteersatpreston.jpg"; ftrURL="hepreston.html"}



if (now.getMonth() == 10)  { isMonth = "November";  ftrTitle="Friedman Forest"; ftrImg="/images/friedmanfall2.jpg"; ftrURL="friedman_forest.html"}



if (now.getMonth() == 11)  { isMonth = "December"; ftrTitle="Masons Mill"; ftrImg="mason3.jpg"; ftrURL="masons_mill.html"}











// -------------------------------------------



// TO CHANGE THIS CODE:



// -------------------------------------------







// in "the array", just find the month you want to change, then the variable you want to change...



// then between the quotation marks (quotes are VERY important) change that variable











// -------------------------------------------



// TO USE CODE WITHIN WEBPAGE:



// -------------------------------------------







// Include Above Code



// type the following into your document 



// 	<script language="JavaScript" src="monthfeature.js"></script>



// where "monthfeature.js" is the name of this file







// Display Current Month:



// type the following into your document 



// 	<script language="javascript"> document.write (isMonth) </script>







// Display Title of Month Feature:



// type the following into your document 



// 	<script language="javascript"> document.write (ftrTitle) </script>







// Display Image



// type the following into your document



// 	<script language="javascript"> 



//	document.write ("<IMG SRC=" + ftrImage + ">") 



//	</script>







// Link URL



// type the following into your document



// 	<script language="javascript"> 



//	document.write ("<a href=" + ftrURL + ">") 



//	</script>












