/*
 * Code Javascript commun pour smmum.org
 * Auteur JP CREST 2010 - jpcrest@orange.fr
 */

// Après chargement de la page //
jQuery(window).load(function() {
	contenuH();
	jQuery("table.menumain td").each(function() {
		jQuery(this).bind("mouseenter mouseleave", function() {
			var sm = jQuery(this).children(".menudetail");
			if (sm) (sm.css("display")=="none") ?sm.show(400) :sm.hide(400);
		});
	});
});
/* Redimensionner contenu selon la taille du window courant */
function contenuH() {
	var ctn,h;
	ctn  = jQuery("#contenu");
	if (ctn) {
	  //alert(ctn.attr("offsetTop")+" - "+jQuery("div.entete").height())
	  h = jQuery(window).height() - ctn.attr("offsetTop") - 46;
	  ctn.css("height",h);
	  // div menumain
	  ctn = jQuery("#menumain");
	  if (ctn) {
		ctn.css("height",h);
	  }
	}
}

