function getFlashMovieObject(movieName)
{
  if (window.document[movieName]) 
  {
      return window.document[movieName];
  }
  if (navigator.appName.indexOf("Microsoft Internet")==-1)
  {
    if (document.embeds && document.embeds[movieName])
      return document.embeds[movieName]; 
  }
  else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
  {
    return document.getElementById(movieName);
  }
}
function musicFct(musicBtn) {
	var monflash=getFlashMovieObject("son");
	var currentFrame=monflash.TGetProperty("/", 4);
	if(document.getElementById(musicBtn).className == "musicon"){
		document.getElementById(musicBtn).className = "musicoff";
		monflash.GotoFrame(2);
		document.cookie = "son = 1";
    return false;
		
	}else{
		document.getElementById(musicBtn).className = "musicon";
		monflash.GotoFrame(4);
		document.cookie = "son = 0";
		return false;
		
	}
}

function setTimer(command,timecode) {
	document.cookie = "timecode = " + timecode;
}

var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
// Gérer tous les messages FSCommand d'une animation Flash.
function son_DoFSCommand(command, args) {
	var sonObj = isInternetExplorer ? document.all.son : document.son;
	document.cookie = "timecode = " + args;
}
// Hook pour Internet Explorer
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<script language=\"VBScript\"\>\n');
	document.write('On Error Resume Next\n');
	document.write('Sub son_FSCommand(ByVal command, ByVal args)\n');
	document.write('	Call son_DoFSCommand(command, args)\n');
	document.write('End Sub\n');
	document.write('</script\>\n');
}
