﻿
function myswf(filename, widthValue, heightValue, bgcolorValue, nameValue, alignValue) {
     var vstr = '';
     vstr+='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" ';
     vstr+='width="' + widthValue + '" height="' + heightValue +'">';
     vstr+='<param name="movie" value="' + filename +'">'; //Flash Filename
     vstr+='<param name="quality" value="high">';
     vstr+='<param name="bgcolor" value="'+ bgcolorValue + '">';
     vstr+='<param name="wmode" value="transparent">';
     vstr+='<embed src="' + filename +'" quality="high" bgcolor="' + bgcolorValue +'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" ';
     vstr+='width="'+ widthValue + '" height="' + heightValue + '" name="' + nameValue + '" align="' + alignValue +'"></embed>';
     vstr+='</object>'; 
     with(document) { open('text/html'); write(vstr); close(); }
}