      var currentDivContents = '';
      var currentPlayerID    = '';
      var instrumentation    =  0;

      function loadPlayer(mp3file, playerid)
      {
        // if a player is already loaded, restore it's div contents
        if(currentDivContents != '')
        {
          gid(currentPlayerID + 'o').innerHTML = currentDivContents;
        }
        // save current div contents
//alert(document.getElementById(playerid + 'o').innerHTML);
        currentDivContents = eval(document.getElementById(playerid + 'o')).innerHTML;

        // save current player id
        currentPlayerID = playerid;

        var flashvars =
        {
          width:                    '200',
          height:                   '20',
          file:                      encodeURIComponent(mp3file),
          autostart:                'true',
          usefullscreen:            'false',
          enablejs:                 'true',
          javascriptid:             'mpl',
										
										skin: 'stylish',
										icons: 'false',
										stretching: 'exactfit',
										aboutlink: '#',
										abouttext: 'RBlib'
										
        };

        var params =
        {
          allowscriptaccess:      'always',
          allowfullscreen:        'false'
        };

        var attributes =
        {
          id:                     'mpl',
          name:                   'mpl'
        };

swfobject.embedSWF('player/player.swf', playerid, '80', '20', '8.0.0', false, flashvars, params, attributes);

        if(instrumentation)
        {
          gid('instrumentation').innerHTML    = 'Instrumentation:';
          gid('currentdivcontents').innerHTML = 'currentDivContents: ' + currentDivContents;
          gid('newdivcontents').innerHTML     = 'newDivContents: ' + eval(document.getElementById(playerid)).innerHTML;
        }
      };
						
						
						
 function getUpdate(typ, pr1, pr2, pid)
      {
        if((typ == 'state') && (pr1 == 3))
        {
          if(currentDivContents != '')
          {
            gid(currentPlayerID + 'o').innerHTML = currentDivContents;
          }
        }
      };

      function gid(name)
      {
        return document.getElementById(name);
      };

      function thisMovie(movieName)
      {
        return document.getElementsByName(movieName)[0];
      };			
						
						
// MOD ADDITION FOR TAI CHI NEWS SLIDER TO STOP PLAYBACK AND EXCHANGE PLAYER WITH IMAGE				
						function changePlayer() {
							//alert('playerid')
					document.getElementById('playerid2o').innerHTML = '<img id="playerid2" src="images/player.gif" width="80" height="20" onclick="loadPlayer(\'media/20081226the-science-of-happiness.mp3\', \'playerid2\'); return false;" alt="PLAY" />';

						}
						
												function changePlayerMusic() {
							//alert('playerid')
					document.getElementById('playerid3o').innerHTML = '<img id="playerid3" src="images/player.gif" width="80" height="20" onclick="loadPlayer(\'Track12.mp3\', \'playerid3\'); return false;" alt="PLAY" />';

						}