function ajaxCalendarFade(AjaxURL)
{
	if ($('wp-calendar-split').innerHTML.length == 0)
	{
		$('wp-calendar-split').innerHTML += '<p class="throbber"><img src="' + throbberURL + '" alt="loading" /></p>';
		$('wp-calendar-split').style.display = "";
		new Ajax.Updater(
			'wp-calendar-split',
			AjaxURL,
			{
				onLoading:function(request){},
				onComplete:function(request){ajaxCalendarFadeComplete(true);},
				asynchronous:true
			}
		);
	} else {
		ajaxCalendarFadeComplete(false)
	}
}

function ajaxCalendarFadeComplete(firstRun) {
	if (firstRun)
	{
		$('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='';
	}
}
