/*	The purpose of this script is simply to decide what the current month is
	and provide a link to a page uniuqe to that month. Common usage is in 
	calendars, where a 'current month' link is desired.
	
	In the event of javascript failure (the user has it off, whatever) nothing
	will be printed so a <noscript></noscript> section should be provided if
	if handling is desired.
	
	Usage: month_link("Current Month", "Current Month", function(){
		return "/calendar/" + c_name + ".shtml"
	});
	
	As you can probably see, the method simply takes a title, the text of the
	link, and a function that returns a string of the built URL.
	
	Variables available in the supplied function:
		c_name (the name of the current month, lowercase)
		c_index (integer representation of the current month, 0-11)
*/

function month_link(title, text, link) {
	names = new Array("january", "february", "march", "april", "may", "june", "july", "august", "september", "october", "november", "december");
	c_index = new Date().getMonth();
	c_name = names[c_index];
	document.writeln('<a href="' + link.call() + '" title="' + title + '">' + text + '</a>');
}