/**
 * Farnborough Association of Magical Entertainers
 * Client Side Scripting - Javascript
 * 
 * Site Design and Implementation by Andy Poole
 * http://www.andy-poole.me.uk
 */

function ShowNewsletter(monthId)
{
	// All the id strings of newsletter divs
	// Must match to the HTML in newsletters.html
	var divIds = [ "news_div_jan",
	               "news_div_feb",
	               "news_div_mar",
	               "news_div_apr",
	               "news_div_may",
	               "news_div_jun",
	               "news_div_jul",
	               "news_div_aug",
	               "news_div_sep",
	               "news_div_oct",
	               "news_div_nov",
	               "news_div_dec" ];

	// Loop and set all elements' styles to display: none;
	// except the div with an id matching newsleterId
	for (var i = 0; i < divIds.length; ++i)
	{
		var id = divIds[i];
		var element = document.getElementById(id);

		if (i == monthId)
			element.style.display = "block";
		else
			element.style.display = "none";
	}

	// This function is to be used for a hyperlink. Returning
	// 'false' stops the navigation to the top of the page.
	return false;
}

