function updateComplexPhotos(complex, el, url)
{
	if(!currComplex)
    return false;

  if(complex == currComplex)
    return false;

  currComplex = complex;
	new Ajax.Updater(el, url, {
		onLoading: function() { $('photos_preloader').show(); },
    onComplete: function() { $('photos_preloader').hide(); }
	});
}

var currentPhotoId = 0;
function changeLargePhoto(url, photoId)
{
	if(currentPhotoId == photoId) return;

	currentPhotoId = photoId;
	new Ajax.Updater({ success: 'preview' }, url, {
		onLoading: function() { $('large_photo_preloader').show(); },
		onComplete: function() { $('large_photo_preloader').hide(); }
	});
}