function showGallery (galleryId, galleryShow) {

	document.getElementById('sort_enabled_01').style.display = 'none';
	document.getElementById('sort_disabled_01').style.display = 'inline';
	Sortable.destroy(galleryId);
	
	if (galleryShow == true) {
		document.getElementById(galleryId).className = 'thumbnail_gallery thumbnail_gallery_showall';
	}
	else {
		document.getElementById(galleryId).className = 'thumbnail_gallery';
	}
	
}

function editGallery (galleryId, galleryShow, thisLinkId, showLinkId) {
	
	if (galleryShow == true) {
		document.getElementById(thisLinkId).style.display = 'none';
		document.getElementById(showLinkId).style.display = 'inline';
		
		document.getElementById(galleryId).className = 'thumbnail_gallery thumbnail_gallery_showall thumbnail_gallery_sort';
		
		Sortable.create(galleryId, {
			tag:'li',
			constraint: false,
			onUpdate:function(){
				//alert(Sortable.serialize(galleryId));
				alert(Sortable.sequence(galleryId));
			}
		})

	}
	else {
		document.getElementById(thisLinkId).style.display = 'none';
		document.getElementById(showLinkId).style.display = 'inline';
		
		document.getElementById(galleryId).className = 'thumbnail_gallery thumbnail_gallery_showall';
		
		Sortable.destroy(galleryId);
	}
	
}
