function run_movie(swf,w,h,wmode,flash_vars)
{
  var text, embed_text = '';

  text ="<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" align=\"\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\" width=\"" + w + "\" height=\"" + h + "\" id=\"" + swf + "\">\r\n";
  text+="<param name=\"allowScriptAccess\" value=\"sameDomain\">\r\n";
  text+="<param name=\"movie\" value=\"" + swf + "\">\r\n";
  text+="<param name=\"menu\" value=\"false\">\r\n";
  text+="<param name=\"quality\" value=\"high\">\r\n";
  text+="<param name=\"bgcolor\" value=\"#ffffff\">\r\n";

  if (typeof wmode != 'undefined' && wmode)
  {
    text += "<param name=\"wmode\" value=\"" + wmode + "\">\r\n";
    embed_text += " wmode=\"" + wmode + "\"";
  }

  if (typeof flash_vars != 'undefined' && flash_vars)
  {
    text += "<param name=\"FlashVars\" value=\"" + flash_vars + "\">\r\n";
    embed_text += " FlashVars=\"" + flash_vars + "\"";
  }

  text+="<embed src=\"" + swf + "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"" + w + "\" height=\"" + h + "\" menu=\"false\" "+embed_text+" bgcolor=\"#ffffff\" allowScriptAccess=\"sameDomain\"></object>\r\n";

  document.write(text);
  return true;
}



function get_flash_code(swf,w,h,wmode,flash_vars)
{
  var text, embed_text = '';

  text ="<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\" width=\"" + w + "\" height=\"" + h + "\" id=\"" + swf + "\">\r\n";
  text+="<param name=\"allowScriptAccess\" value=\"sameDomain\">\r\n";
  text+="<param name=\"movie\" value=\"" + swf + "\">\r\n";
  text+="<param name=\"menu\" value=\"false\">\r\n";
  text+="<param name=\"quality\" value=\"high\">\r\n";
  text+="<param name=\"scale\" value=\"exactfit\">\r\n";
  text+="<param name=\"bgcolor\" value=\"#ffffff\">\r\n";

  if (typeof wmode != 'undefined' && wmode)
  {
    text += "<param name=\"wmode\" value=\"" + wmode + "\">\r\n";
    embed_text += " wmode=\"" + wmode + "\"";
  }

  if (typeof flash_vars != 'undefined' && flash_vars)
  {
    text += "<param name=\"FlashVars\" value=\"" + flash_vars + "\">\r\n";
    embed_text += " FlashVars=\"" + flash_vars + "\"";
  }

  text+="<embed src=\"" + swf + "\" quality=\"high\" scale=\"exactfit\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"" + w + "\" height=\"" + h + "\" menu=\"false\" "+embed_text+" bgcolor=\"#ffffff\" allowScriptAccess=\"sameDomain\">\r\n";
  text+="</object>\r\n";

  return text;
}

/*
function run_movie(swf,w,h,file)
{
  text ="<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\" width=\"" + w + "\" height=\"" + h + "\" id=\"" + swf + "\">\r\n";
  text+="<param name=\"allowScriptAccess\" value=\"sameDomain\">\r\n";
  text+="<param name=\"movie\" value=\"" + swf + "\">\r\n";
  text+="<param name=\"menu\" value=\"false\">\r\n";
  text+="<param name=\"quality\" value=\"high\">\r\n";
  text+="<param name=\"scale\" value=\"exactfit\">\r\n";
  text+="<param name=\"bgcolor\" value=\"#ffffff\">\r\n";
  text+="<param name=\"FlashVars\" value=\"file_name=" + file + "\">\r\n";
  text+="<embed src=\"" + swf + "\" quality=\"high\" scale=\"exactfit\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"" + w + "\" height=\"" + h + "\" menu=\"false\" FlashVars=\"file_name=" + file + "\" bgcolor=\"#ffffff\" allowScriptAccess=\"sameDomain\">\r\n";
  text+="</object>\r\n";

  document.write(text);
  return true;
}

function run_movie_opaque(swf,w,h,param)
{
text ="<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\" width=\"" + w + "\" height=\"" + h + "\" id=\"" + swf + "\">\r\n";
text+="<param name=\"allowScriptAccess\" value=\"sameDomain\">\r\n";
text+="<param name=\"movie\" value=\"" + swf + "\">\r\n";
text+="<param name=\"menu\" value=\"false\">\r\n";
text+="<param name=\"quality\" value=\"high\">\r\n";
text+="<param name=\"scale\" value=\"exactfit\">\r\n";
text+="<param name=\"wmode\" value=\"opaque\">\r\n";
text+="<param name=\"bgcolor\" value=\"#ffffff\">\r\n";
text+="<param name=\"FlashVars\" value=\"" + param + "\">\r\n";
text+="<embed src=\"" + swf + "\" quality=\"high\" scale=\"exactfit\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"" + w + "\" height=\"" + h + "\" menu=\"false\" FlashVars=\"" + param + "\" bgcolor=\"#ffffff\" wmode=\"opaque\" allowScriptAccess=\"sameDomain\">\r\n";
text+="</object>\r\n";

document.write(text);
return 1;
}

function run_movie_transparent(swf,w,h,file)

{
text ="<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\" width=\"" + w + "\" height=\"" + h + "\" id=\"" + swf + "\">\r\n";
text+="<param name=\"allowScriptAccess\" value=\"sameDomain\">\r\n";
text+="<param name=\"movie\" value=\"" + swf + "\">\r\n";
text+="<param name=\"menu\" value=\"false\">\r\n";
text+="<param name=\"quality\" value=\"high\">\r\n";
text+="<param name=\"scale\" value=\"exactfit\">\r\n";
text+="<param name=\"wmode\" value=\"transparent\">\r\n";
text+="<param name=\"bgcolor\" value=\"#ffffff\">\r\n";
text+="<param name=\"FlashVars\" value=\"file_name=" + file + "\">\r\n";
text+="<embed src=\"" + swf + "\" quality=\"high\" scale=\"exactfit\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"" + w + "\" height=\"" + h + "\" menu=\"false\" FlashVars=\"file_name=" + file + "\" bgcolor=\"#ffffff\" wmode=\"transparent\" allowScriptAccess=\"sameDomain\">\r\n";
text+="</object>\r\n";

document.write(text);
return 1;
}
*/
