/* NAVIGATOR LOADING */

function search_start()
{
	$('media_navigator').style.display = 'none';
	$('search_indicator_div').style.display = 'inline';
}

function search_end()
{
	$('search_indicator_div').style.display = 'none';
	$('media_navigator').style.display = 'inline';

	display_media_navigator();
}

/* PAGINATION LOADING */

function pagination_start()
{
	$('black_background').style.zIndex = '3';
	$('black_background').style.display = 'inline';
	$('search_indicator_div').style.display = 'inline';

	$('custom_medias_temporary').innerHTML = $('custom_medias').innerHTML;
	$('custom_medias_temporary').style.left = '0px';
}

function pagination_end(direction)
{
	$('black_background').style.display = 'none';
	$('black_background').style.zIndex = '1';
	$('search_indicator_div').style.display = 'none';

	$('custom_medias').style.left = (-direction*424) + 'px';
	display_media_navigator();

	Effect.MoveBy('custom_medias', 0, direction*424, {duration:1, fps:25, from:0.0, to:1.0, afterFinish:function(){clear_custom_medias_temporary()}});
	Effect.MoveBy('custom_medias_temporary', 0, direction*424, {duration:1, fps:25, from:0.0, to:1.0});
}

function clear_custom_medias_temporary()
{
	$('custom_medias_temporary').innerHTML = '';
}

/* DISPLAY NAVIGATOR */

function display_media_navigator()
{
	$('custom_medias_container').style.top = '0px';
}

