function ajaxCalendarFade(AjaxURL, posts)
{
	var targ = (posts) ? 'wp-calendar-split' : 'ajax_calendar';
	if (($(targ).innerHTML.length == 0) || !posts)
	{
		$('wp-calendar-split').innerHTML = '<p class="throbber"><img src="' + throbberURL + '" alt="loading" /></p>';
		$('wp-calendar-split').style.display = "";
		new Ajax.Updater(
			(posts) ? 'wp-calendar-split' : 'ajax_calendar',
			AjaxURL,
			{
				onLoading:function(request){},
				onComplete:function(request){ajaxCalendarFadeComplete(true, posts);},
				asynchronous:true
			}
		);
	} else {
		ajaxCalendarFadeComplete(false, posts)
	}
}

function ajaxCalendarFadeComplete(firstRun, posts)
{
	if (sweetTitles)
		sweetTitles.tipOut();
	if (firstRun || !posts)
	{
		$('wp-calendar-split').style.display='none';
		Behaviour.apply();
	}
	if (!window.opera) {
		new Effect.Phase('wp-calendar-split');
	} else {
		if ($('wp-calendar-split').style.display=='')
			$('wp-calendar-split').style.display='none';
		else
			$('wp-calendar-split').style.display='';
	}
}
