// JavaScript Document for UTF-8
function wr_lk(bn)
{
	utxt = document.URL;
	spstr = utxt.split("/");
	yy = eval(spstr[5]);
	mm = spstr[6];
	mon = eval(mm);
	arc_loc = "mt/archives/";
	if(bn == 2)
	{
		arc_loc = "mt2/archives/";		
	}

	if(yy < 2006)
	{
		return;
	}
	if(yy == 2006 && (mm == 02 || mm == 01))
	{
		return;
	}
	// 
	today = new Date(); 
	if(yy > today.getYear() )
	{
		return;
	}
	else if(yy == today.getYear() && mon-1 > today.getMonth())
	{
		return;
	}
	
	
	// 
	py = yy;
	ny = yy;
	pm = mm;
	nm = mm;
	switch(mon)
	{
	case 1:
		pm = "12";
		nm = "02";
		py = yy - 1;
		break;	
	case 2:
		pm = '01';
		nm = '03';
		break;	
	case 3:
		pm = "02";
		nm = "04";
		break;	
	case 4:
		pm = "03";
		nm = "05";
		break;	
	case 5:
		pm = "04";
		nm = "06";
		break;	
	case 6:
		pm = "05";
		nm = "07";
		break;	
	case 7:
		pm = "06";
		nm = "08";
		break;	
	case 8:
		pm = "07";
		nm = "09";
		break;	
	case 9:
		pm = "08";
		nm = "10";
		break;	
	case 10:
		pm = "09";
		nm = "11";
		break;	
	case 11:
		pm = "10";
		nm = "12";
		break;	
	case 12:
		pm = "11";
		nm = "01";
		ny = yy + 1;
		break;	
	}


	// 書き込み
	document.write('<table border="0" width="100%" cellspacing="0" cellpadding="0"><tr>');
	document.write('<td text-align="left" width="20%">');
	
	if(yy == 2006 && mon == 3 )
	{
	}
	else
	{
		document.write('<a href="http://globalnet-akiko.jp/');
		document.write(arc_loc);
		document.write(py);
		document.write('/');	
		document.write(pm);	
		document.write('/index.html"><span class="calLink">前月</span></a> ');		
	}

	document.write('</td><td></td><td text-align="right" width="20%">');
	if(yy == today.getYear() && mon-1 == today.getMonth())
	{
		
	}else
	{
		document.write('<a href="http://globalnet-akiko.jp/');
		document.write(arc_loc);
		document.write(ny);
		document.write('/');	
		document.write(nm);	
		document.write('/index.html"><span class="calLink">翌月</span></a> ');		
	}
	
	document.write('</td></tr></table>');
	return;
}
