
 var oldWrapper = null;
 var oldCode;


 function removeOldPlayer(theOldWrapper, theOldCode) {
  document.getElementById(theOldWrapper).innerHTML = theOldCode;
 }


 function createPlayer(theWrapper, thePlaceholder, thePlayer, theFile, theStart) {
  if (oldWrapper != null) { removeOldPlayer(oldWrapper, oldCode); }

  oldWrapper = theWrapper;
  oldCode = document.getElementById(oldWrapper).innerHTML;

  var flashvars = {
   file:theFile,
   autostart:theStart
  }

  var params = {
   allowfullscreen:"true",
   allowscriptaccess:"always"
  }

  var attributes = {
   id:thePlayer,
   name:thePlayer
  }

  swfobject.embedSWF("share/flv/player_4.swf", thePlaceholder, "320", "240", "9.0.115", false, flashvars, params, attributes);
 }
