// JavaScript Document

function nextMonth()
{
	showLoading('maindiv');
	sndReq('addhomenews');
}


function showLoading(section)
{
	document.getElementById(section).innerHTML = 'Loading ...';
}

document.curMonth = 0;

function cal_jump_to_month(m)
{
	document.curMonth = m;
	document.curYear = document.thisYear;
	cal_month_prev_next(-1);
}

function cal_jump_to_month_and_year(m,y)
{
	document.curMonth = m;
	document.curYear = y;
	cal_month_prev_next(-1);
}





function cal_month_prev_next(m)
{
	if(m == 1)
		document.curMonth++;
	if(m == 0)
		document.curMonth--;
		
	if(document.curMonth > 12)
	{
		document.curMonth = 1;
		document.curYear++;
	}
	else if(document.curMonth < 1)
	{
		document.curMonth = 12;
		document.curYear--;
	}
	sndReq('getCalendarMonth','1&theDiv=calendar_main_listing&theMonth='+ document.curMonth + '&theYear=' + document.curYear);

}


function gallery_show(m)
{
	
	sndReq('getPhotos','1&theDiv=galleryChangeArea&gallery='+m);

}


