function StoryBoardAE(src,width,height,quality,bgcolor,type,menu,loop,wMode) {
    var loopParam='', loopEmbed='', wModeParam='', wModeEmbed='', widthStr='', heightStr='';

    if (loop.length>0) {
        loopParam = '<PARAM NAME="loop" VALUE="'+loop+'" />';
        loopEmbed = 'LOOP="'+loop+'" ';
    }
    if (wMode.length>0) {
        wModeParam = '<PARAM NAME="wMode" VALUE="'+wMode+'" />';
        wModeEmbed = 'wMode="'+wMode+'" ';
    }

    if (width.length>0)
        widthStr = 'WIDTH="'+width+'" ';
    
    if (height.length>0)
        heightStr = 'HEIGHT="'+height+'" ';


    var theEmbed =
     '<OBJECT codeBase=https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0 '+
              widthStr+
              heightStr+
              'id="epath" ' +
              'classid=clsid:d27cdb6e-ae6d-11cf-96b8-444553540000>'+
         '<PARAM NAME="movie" VALUE="'+src+'" />'+
         '<PARAM NAME="play" VALUE="true" />'+
         loopParam+
         wModeParam+
         '<PARAM NAME="quality" VALUE="'+quality+'" />'+
         '<EMBED '+
              'SRC="'+src+'" '+
              widthStr+
              heightStr+
              'name="epath" ' +
              loopEmbed+
              wModeEmbed+
              'QUALITY="'+quality+'" '+
              'TYPE="application/x-shockwave-flash" '+ 
              'PLUGINSPAGE="https://www.macromedia.com/getflashplayer" '+
              'swLiveConnect="true">'+
         '</EMBED>'+
    '</OBJECT>';
    //alert(theEmbed);
    document.write(theEmbed);
}
