function menuover(menu)
{
  menu.style.backgroundColor="gold";
  menu.style.color="black";
  if (menu.firstChild.nextSibling)
  {                                     
    menu.firstChild.nextSibling.style.display="block";
  }
}

function menuout(menu)
{
	menu.style.backgroundColor="transparent";
  menu.style.color="white";
  if (menu.firstChild.nextSibling)
  {
    menu.firstChild.nextSibling.style.display="none";
  }
}

function sousmenuover(sousmenu)
{
  sousmenu.style.backgroundColor="#000011";
  sousmenu.style.color="gold";
}

function sousmenuout(sousmenu)
{
	sousmenu.style.backgroundColor="gold";
  sousmenu.style.color="black";
  if (sousmenu.firstChild.nextSibling)
  {
    sousmenu.firstChild.nextSibling.style.display="none";
  }
}

function ligneover(ligne)
{
  ligne.style.backgroundColor="gold";
  ligne.style.color="black";
}

function ligneout(ligne)
{
  ligne.style.backgroundColor="transparent";
  ligne.style.color="inherit";
}

function jourxover(jour)
{
  jour.style.backgroundColor="lightgrey";
}

function jourxout(jour)
{
  jour.style.backgroundColor="whitesmoke";
}

function jourover(jour)
{
  jour.style.backgroundColor="black";
  jour.style.color="gold";
}

function jourout(jour)
{
  jour.style.backgroundColor="gold";
  jour.style.color="black";
}

function selectionner_musique(fichier,titremusique)
{
  param=document.getElementById("param");
  param.setAttribute("value","audio/dewplayer.swf?mp3=audio/"+fichier+".mp3&amp;bgcolor=000000");
  embed=document.getElementById("embed");
  embed.setAttribute("src","audio/dewplayer.swf?mp3=audio/"+fichier+".mp3&amp;autostart=1&amp;bgcolor=000000");
  titre=document.getElementById("titremusique");
  titre.firstChild.nodeValue=titremusique;
}

function play(fichier,titremusique)
{
  if (fichier!="")
  {
    titre=document.getElementById("titremusique");
    titre.firstChild.nodeValue=titremusique;
    $("#jplayer").jPlayer("setMedia",{mp3:"../audio/"+fichier}).jPlayer("play");
  }
  else
  {
    $("#jplayer").jPlayer("play");
  }
}

function pause()
{
  $("#jplayer").jPlayer("pause");
}

function stop()
{
  $("#jplayer").jPlayer("stop");
}

function playstopextrait(fichier,image)
{
  if (fichier!="")
  {
  	if ($("#jplayer").data("jPlayer").status.paused)
  	{
	    $("#jplayer").jPlayer("setMedia",{mp3:"../audio/cds/jmguerre/"+fichier}).jPlayer("play");
	    $(".cdplay").attr("src","../img/droite.png");
	    $("#"+image).attr("src","../img/carre.png");
  	}
  	else
  	{
  		if ($("#jplayer").data("jPlayer").status.src.search(fichier)>=0)
  		{
	  		$("#jplayer").jPlayer("stop");
		    $("#"+image).attr("src","../img/droite.png");
  		}
  		else
  		{
		    $("#jplayer").jPlayer("setMedia",{mp3:"../audio/cds/jmguerre/"+fichier}).jPlayer("play");
		    $(".cdplay").attr("src","../img/droite.png");
		    $("#"+image).attr("src","../img/carre.png");
  		}
  	}
  }
}

function imageplayer(element,image)
{
  document.getElementById(element).setAttribute("src","../img/"+image);
}

function afficheshow(affiche)
{
  var top=document.body.scrollTop;                                 
  var height=document.body.clientHeight;
  var left=(document.body.clientWidth-800)/2;
  $("#affichephoto").css({width:"800px",height:height+"px",src:"img/affiches/"+affiche});
  $("#affiche").css({top:top+"px",left:left+"px",width:"800px",height:height+"px"});
  $("#affiche").show("slow");
}

function cvshow(cv)
{
  var top=document.body.scrollTop+20;                                 
  var height=document.body.clientHeight-80;
  var left=(document.body.clientWidth-800)/2;                                 
  $("#"+cv).css({top:top+"px",left:left+"px",width:"800px",height:height+"px"});
  $("#"+cv).show("slow");
}

function cvhide(cv)
{
  $("#"+cv).hide("slow");
}

function musicienshow(musicien)
{
  $(".musicienligne").show("slow");
  $(".musicien").hide("slow");
  $("#musicienligne"+musicien).hide("slow");
  $("#musicien"+musicien).show("slow",function(){
    $(window).scrollTo("#musicien"+musicien,800);
  });
  
}

function musicienhide(musicien)
{
  $("#musicien"+musicien).hide("slow");
  $(".musicienligne").show("slow");
}

function programmeshow(programme)
{
  var top=document.body.scrollTop+20;                                 
  var left=(document.body.clientWidth-800)/2;
  var height=document.body.clientHeight-80;
  var topimg=top-20;
  var leftimg=left+20;
  $("#"+programme).css({top:top+"px",left:left+"px",width:"800px",height:height+"px"});
  $("#"+programme).show("slow");
}

function programmehide(programme)
{
  $("#"+programme).hide("slow");
}

function cdpresentationshow(presentation,menu)
{
	$("li#limenu").removeClass();
	$(menu).addClass("selected");
  $("td#cdcontenu").fadeOut();
  $(".presentation").fadeIn();
}

function cdprogrammeshow(programme,menu)
{
	$("li#limenu").removeClass();
	$(menu).addClass("selected");
  $("td#cdcontenu").fadeOut();
  $(".programme").fadeIn();
}

function diaporamashow(index,fichier)
{
  var top=document.body.scrollTop+20;                                 
  var left=(document.body.clientWidth-820)/2;
  var height=document.body.clientHeight-60;
  var width=820;
  $("#diaporama").css({top:top+"px",left:left+"px",height:height+"px",width:"820px"});
  $("#diaporama").show("slow");
  $("#diaporama").cycle(
  {
    fx:"all",
    fit:1,
    startingSlide:index,
    requeueOnImageNotLoaded:true,
    height:height+"px",
    width:null,
    nowrap:1,
    timeout:5000,
    before:function(currSlideElement,nextSlideElement,options,forwardFlag)
    {
      var largeur=nextSlideElement.width;
      var hauteur=nextSlideElement.height;
      if (largeur>hauteur)
      {
        width=820;
      }
      else
      {
        width=height/hauteur*800+20;
      }
      left=(document.body.clientWidth-width)/2;
      $("#diaporama").animate({left:left+"px",width:width+"px"},500);
    }
  });
}

function diaporamahide()
{
  $("#diaporama").cycle("destroy");
  $("#diaporama").hide("slow");
}

function livredor()
{
  $("#formulaire").show("fade");
}

function position_fixe()
{
  var scroll=$(document).scrollTop();
  var top=127+eval(scroll);
  var topcv=scroll+20;
  $("#menu").stop();
  $("#menu").animate({top:[top+"px","swing"]},500);
  $(".cv").stop();
  $(".cv").animate({top:[topcv+"px","swing"]},500);
  $(".programme").stop();
  $(".programme").animate({top:[topcv+"px","swing"]},500);
}

function versancre(ancre)
{
  if (ancre=="0")
  {
    $(window).scrollTo(0,800);
  }
  else
  {
    $(window).scrollTo($("#"+ancre),800);
  }  
}

function menuagendamois()
{
  //$("#menuagendamois").show("fast");
}

function menuagendaannee()
{
}


