function flash_NewFlashComponet(parentEl, player)
{
      var div = cE("div", parentEl);

      var src = player.path;
	  var width = player.width;
	  var height = player.height;
	  var id = player.id;
	  
      var protocol = window.location.protocol;

      if(protocol.charAt(protocol.length - 1) == ':')
      {
            protocol = protocol.substring(0,  protocol.length - 1);
      }

      var flashVars =
          'uniqueId=' +  encodeURIComponent(id)
        +  '&sourceType=string'
        +  '&scaleMode=showAll'
        +  '&debug=true'
        + '&svgId='  + encodeURIComponent(id);

      var flash  =
          '<object\n  '
            + 'classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"\n  '
            + 'codebase="'
            + protocol         
            + '://fpdownload.macromedia.com/pub/shockwave/cabs/flash/'
            + 'swflash.cab#version=9,0,0,0"\n  '
            + 'width="' + width + '"\n  '
            + 'height="' + height + '"\n  '
            + 'id="'  + id + '"\n  '
            + 'name="' + id + '"\n  '
            + 'style="' + '"\n  '
            + 'class="' + '"\n  '
            + '>\n '
            + '<param name="allowScriptAccess" value="always"></param>\n  '
            + '<param name="movie" value="' + src + '"></param>\n  '
            + '<param name="quality" value="high"></param>\n  '
            + '<param name="FlashVars" value="' + flashVars + '"></param>\n  '
            + '<param name="wmode" value="transparent">'  +  '</param>\n'
            + '<embed  '
            + 'src="' + src + '"  '
            + 'quality="high"  '
            + 'wmode="transparent" \n'
            + 'width="' + width + '"  '
            + 'height="' + height + '"  '
            + 'id="' + id + '"  '
            + 'name="' + id + '"  '
            + 'swLiveConnect="true"  '
            + 'allowScriptAccess="always"  '
            + 'type="application/x-shockwave-flash"  '
            + 'FlashVars="' + flashVars + '"  '
            + 'pluginspage="'
            +  protocol         
            + '://www.macromedia.com/go/getflashplayer"  '
            + 'style="' + '"\n  '
            + 'class="' + '"\n  '
            + ' />'
            + '</object>';

      insertFlash(player, flash, div);
};

function insertFlash(player, flashStr, replaceMe)
{
	var  flashObj;
	
	if(document.all)
	{
		replaceMe.outerHTML =  flashStr;
	}
	else
	{
		var div =  document.createElement('div');
		div.innerHTML =  flashStr;
		flashObj =  div.childNodes[0];
		div.removeChild(flashObj);
	
		for (var i = 0; i <  flashObj.childNodes.length; i++)
		{
			  var check =  flashObj.childNodes[i];
	
			  if(check.nodeName.toUpperCase() == 'EMBED')
			  {
					flashObj  = check;
					break;
			  };
		};
	
		replaceMe.parentNode.replaceChild(flashObj,  replaceMe);
	};

};
