function calendarCenterShow(uri, viewUri, viewType, day, month, year, entryType){
	$.post(uri, 
		{	
			calView:viewType,
			viewUri:viewUri,
			calDay:day,
			calMonth:month,
			calYear:year,
			display_type:'element',
			et:entryType,
			useAjax:'true'
		},
		onAjaxCenterShowSuccess
		);
}

function calendarInitialCenterShow(uri, defaultView){
	$.post(uri, {defaultView:defaultView}, onAjaxCenterShowSuccess );
}

function onAjaxCenterShowSuccess(data){
	$("#detail_calendar").fadeOut(250);
	setTimeout(function(){$("#detail_calendar").empty().append(data).fadeIn("fast");}, 200);
}

function calendarSidePagination(uri, year, month, entryType){
	$.post(uri, 
		{
			calYear:year,
			calMonth:month,
			display_type:'element',
			et:entryType
		},
		onAjaxSidePaginationSuccess
	);
}
function onAjaxSidePaginationSuccess(data){
	$("#calendar_month").fadeOut(100);
	setTimeout(function(){$("#calendar_month").replaceWith(data).fadeIn("fast");}, 70);
}
function calendarDetailShow(uri, date, entryType){
	if (date != -1){
		$.post(uri, 
			   {	
					calDat:date,
					display_type:'element',
					et:entryType,
					useAjax:'true'
			   },
			   onAjaxCenterShowSuccess);
	} else {
		$.post(uri,
			   {
					display_type:'element',
					et:entryType,
					useAjax:'true'
			   }, 
			   onAjaxCenterShowSuccess);
	}
}

