playlist1 = 'globale1.xml?';
playlist = 'http://www.federationfrancaisedesdansesorientales.fr/webtv/rss/' + playlist1;

var flashvars =
{
'file': encodeURIComponent(playlist + Math.round(1000 * Math.random())),
'shuffle': 'false',
'repeat': 'always',
'playlist': 'none',
'playlistsize': '118',
'icons': 'true',
'bufferlength': '5',
'stretching': 'uniform',
'volume': '80',
'mute': 'true',
'frontcolor': '957a24',
'lightcolor': '957a24',
'playlist.thumbs': 'true',
'quality': 'true',
'smoothing': 'true',
'id': 'playerId',
'autostart': 'true',
'item': '1'
};
var params =
{
'allowfullscreen': 'false',
'allowscriptaccess': 'always',
'wmode': 'opaque'
};
var attributes =
{
'id': 'playerId',
'name': 'playerId'
};
swfobject.embedSWF('http://www.federationfrancaisedesdansesorientales.fr/embed/baladi03.swf', 'baladi03', '160', '120', '9.0.124', false, flashvars, params, attributes);
//****************************************************
var player        =  null;
var playlist      =  null;
var currentTrack  =  null;
      function playerReady(obj)
      {
        player = gid(obj.id);
        addListeners();
      };
      function addListeners()
      {
        playlist = player.getPlaylist();
        player.addControllerListener('PLAYLIST', 'playlistMonitor');
		player.addModelListener("ERROR", "errorMonitor");
      };

	  function playlistMonitor(obj)
      {
        player.sendEvent('ITEM', currentTrack);
      };
      function loadNindex(playlist, track)
      {
       	currentTrack = track;
        player.sendEvent('STOP');
        player.sendEvent('LOAD', playlist);
      };
      function gid(name)
      {
        return document.getElementById(name);
      };
	  function errorMonitor(obj)
      {
      if((obj.message.match('Video not found:') !== null) || (obj.message.match('Video not found or access denied:') !== null) || (obj.message.match('Stream not found:') !== null))
        {
          player.sendEvent('LOAD', 'http://www.federationfrancaisedesdansesorientales.fr/webtv/chaines/globale1.xml');
		  player.sendEvent('PLAY', 'true');
        }
      };

//****************************************************