
function swapArticle (id) {
  $('#expand'+id).toggle();
}

function goBlog (form, value) {
	if (form.go)
		form.go.value = value;
}

function change_format (obj) {
	var form = obj.form;
	var sel = '';
	if ( (form.sumary_bact!='' || form.content_bact!='') ) {
		return confirm (i18n_blog_change_format);
	}
	return true;
}


// Suppression d'un droit sur un membre
function deleteMembres () {
  nb_checked = $('form#form input[type=checkbox]:checked').size();
  if (!nb_checked)
    alert (i18n_blog_check_members);
  else {
    $('form#form').submit();
  }
}


/* Vérification de la hauteur des blocs et modification de l'apparence si besoin */
$(document).ready(function(){
	
	var sidebarHeight = $('#blog-sidebar').height() + 250; // Si la sidebar contient une image, Safari n'a pas encore chargé l'image, donc la hauteur n'est pas bonne !
	var contentHeight = $('#blog-content').height();
	console.log ('sidebar : '+sidebarHeight + ' content : '+contentHeight);
	if (sidebarHeight > contentHeight)
		$('#blog-content').css('min-height', sidebarHeight);
	
});
