 //<![CDATA[
      var myListener = new Object();
      
      /**
       * Initialisation
       */
      myListener.onInit = function()
      {
          this.position = 0;
      };
      /**
       * Update
       */
      myListener.onUpdate = function()
      {
          var isPlaying = (this.isPlaying == "true");
          
          if(isPlaying == "false" && this.position == 0)
          {
			play(mp3);
          }
         
          var timelineWidth = 160;
          
      };
      
      function getFlashObject()
      {
          return document.getElementById("myFlash");
      }
 
      function play(mp3)
      {
      	if(getFlashObject() != null)
		{
          if (myListener.position == 0) {
              getFlashObject().SetVariable("method:setUrl", base_url + "bande_son/" + mp3 + ".mp3");
          }
          
          getFlashObject().SetVariable("method:play", "");
          getFlashObject().SetVariable("enabled", "true");
      	}
      }
 
      function pause()
      {
          getFlashObject().SetVariable("method:pause", "");
      }
      
      function stop()
      {
      	if(getFlashObject() != null)
      	{
          getFlashObject().SetVariable("method:stop", "");
      	}
      }
      
      function setPosition()
      {
          var position = document.getElementById("inputPosition").value;
          getFlashObject().SetVariable("method:setPosition", position);
      }
      function setVolume()
      {
          var volume = document.getElementById("inputVolume").value;
          getFlashObject().SetVariable("method:setVolume", volume);
      }
  //]]>

