// CURRENT MONTH/YEAR VARIABLES

var currentmonth = page.substr(5,2);
var currentyear = page.substr(0,4);

if (currentmonth < 10)
	{
		currentmonth = currentmonth.substr(1,1);
	}

currentmonth = Number(currentmonth);
currentyear = Number(currentyear);

// PREVIOUS MONTH/YEAR VARIABLES

var previousmonth;
var previousyear;
if (currentmonth == 1)
	{
		previousmonth = 12;
		previousyear = currentyear - 1;
	}
	else
		{
			previousmonth = currentmonth - 1;
			previousyear = currentyear;
		}

// NEXT MONTH/YEAR VARIABLES

var nextmonth;
var nextyear;
if (currentmonth == 12)
	{
		nextmonth = 1;
		nextyear = currentyear + 1;
	}
	else
		{
			nextmonth = currentmonth + 1;
			nextyear = currentyear;
		}

// OPEN BRACKET

window.document.write('<p align="center">');
window.document.write('[ ');

// DISPLAY PREVIOUS MONTH/YEAR (HYPERLINK)

if (page != '2001_04')
{
	var previousmonthstring = previousmonth.toString();

	if (previousmonth < 10)
		{
			previousmonthstring = '0' + previousmonth;
		}

	window.document.write('<a href="../' + previousyear + '_' + previousmonthstring + '/">&#171; ');

	if (previousmonth == 1)
		{ window.document.write('January '); }
	else if (previousmonth == 2)
		{ window.document.write('February '); }
	else if (previousmonth == 3)
		{ window.document.write('March '); }
	else if (previousmonth == 4)
		{ window.document.write('April '); }
	else if (previousmonth == 5)
		{ window.document.write('May '); }
	else if (previousmonth == 6)
		{ window.document.write('June '); }
	else if (previousmonth == 7)
		{ window.document.write('July '); }
	else if (previousmonth == 8)
		{ window.document.write('August '); }
	else if (previousmonth == 9)
		{ window.document.write('September '); }
	else if (previousmonth == 10)
		{ window.document.write('October '); }
	else if (previousmonth == 11)
		{ window.document.write('November '); }
	else if (previousmonth == 12)
		{ window.document.write('December '); }

	window.document.write(previousyear);

	window.document.write('</a>');
	window.document.write(' | ');
}

// DISPLAY CURRENT MONTH/YEAR (BOLD TEXT)

window.document.write('<b>');

if (currentmonth == 1)
	{ window.document.write('January '); }
else if (currentmonth == 2)
	{ window.document.write('February '); }
else if (currentmonth == 3)
	{ window.document.write('March '); }
else if (currentmonth == 4)
	{ window.document.write('April '); }
else if (currentmonth == 5)
	{ window.document.write('May '); }
else if (currentmonth == 6)
	{ window.document.write('June '); }
else if (currentmonth == 7)
	{ window.document.write('July '); }
else if (currentmonth == 8)
	{ window.document.write('August '); }
else if (currentmonth == 9)
	{ window.document.write('September '); }
else if (currentmonth == 10)
	{ window.document.write('October '); }
else if (currentmonth == 11)
	{ window.document.write('November '); }
else if (currentmonth == 12)
	{ window.document.write('December '); }

window.document.write(currentyear);
window.document.write('</b>');

// DISPLAY NEXT MONTH/YEAR (HYPERLINK)

if (page != '2012_01')
{
	window.document.write(' | ');

	var nextmonthstring = nextmonth.toString();

	if (nextmonth < 10)
		{
			nextmonthstring = '0' + nextmonth;
		}

	window.document.write('<a href="../' + nextyear + '_' + nextmonthstring + '/">');

	if (nextmonth == 1)
		{ window.document.write('January '); }
	else if (nextmonth == 2)
		{ window.document.write('February '); }
	else if (nextmonth == 3)
		{ window.document.write('March '); }
	else if (nextmonth == 4)
		{ window.document.write('April '); }
	else if (nextmonth == 5)
		{ window.document.write('May '); }
	else if (nextmonth == 6)
		{ window.document.write('June '); }
	else if (nextmonth == 7)
		{ window.document.write('July '); }
	else if (nextmonth == 8)
		{ window.document.write('August '); }
	else if (nextmonth == 9)
		{ window.document.write('September '); }
	else if (nextmonth == 10)
		{ window.document.write('October '); }
	else if (nextmonth == 11)
		{ window.document.write('November '); }
	else if (nextmonth == 12)
		{ window.document.write('December '); }

	window.document.write(nextyear);
	window.document.write(' &#187;</a>');
}

// LINK TO ARCHIVES INDEX

window.document.write(' | ');
window.document.write('<a href="../">Index</a>');

// CLOSE BRACKET

window.document.write(' ]');
window.document.write('</p>');

