function goLastMonth(month, year) 
{ 
	// If the month is Januaru, decrement the year 
	if(month == 1) 
	{ 
		--year; 
		month = 13; 
	} 
	
	document.location.href = getCurrentUrl() + '?month='+(month-1)+'&year='+year; 
} 

function goNextMonth(month, year) 
{ 
	// If the month is December, increment the year 
	if(month == 12) 
	{ 
		++year; 
		month = 0; 
	} 
	
	document.location.href = getCurrentUrl() + '?month='+(month+1)+'&year='+year; 
}

function getCurrentUrl()
{
	url = document.location.href;
	pos = url.indexOf("?");
	if (pos >= 0)
		return url.substring(0, pos);
	else
		return url;
}