/**
 * @author MHamby
 */
 $(document).ready(function(){
	$("a.prevMonth").live("click", updateCalendar);
	$("a.nextMonth").live("click", updateCalendar);
	
});

var updateCalendar = function(){
	locationurl = $(this).attr("href");	//get the entire url string for the previous month (i.e. mo=X&yr=X)
	qsarray = locationurl.split("?");	//break the string down into the page and query string
	qs = qsarray[1];					//get the query string
	//get the html using ajax and update the display of the calendar with the returned html
	$.get(
		"/customtags/dspCalendar.cfm",
		qs,
		function(data){
			$("div#dspCalendar").html(data);
		},
		type="html"			
	);
	return false;						//stop the link mechanism from firing
}
